+ Reply to Thread
Results 1 to 9 of 9

Static Footer Filepath

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Static Footer Filepath

    using the information found at http://msdn.microsoft.com/en-us/libr.../ff822794.aspx I'm using the below macro to put the Filepath and Workbook name into the sheets of the active workbook. Everything works as designed, except when I send the workbook through email, and the person on the other end opens the workbook, the filepath is to their Temporary Internet Files instead of the path to where the workbook is saved. How do I get the workbook path to stay static?
    Please Login or Register  to view this content.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Static Footer Filepath

    Perhaps

    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Static Footer Filepath

    you'd have to literally put the path in there rather than use the setup codes
    Please Login or Register  to view this content.
    of course it won't update if Julie saves the file somewhere else either :-)
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Static Footer Filepath

    SHG,
    using your idea, constructing the line like this:
    Please Login or Register  to view this content.
    the result is
    Please Login or Register  to view this content.
    There's a long space, moving the path to almost the center of the sheet, instead of to the left.

    Joseph P,
    using your idea, the result is
    Please Login or Register  to view this content.
    , which stays static through email. I think you've got it. Now, any idea how to remove the comma from in front of the "C"?

  5. #5
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Static Footer Filepath

    remove it from before the &10
    Please Login or Register  to view this content.

  6. #6
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Static Footer Filepath

    Sweet! That does the trick.

    going to "of course it won't update if Julie saves the file somewhere else either :-) ", how would we do this if wanted it to be global, tied to any workbook/save event that she does, so on a save it would be refreshed with the new file path?

  7. #7
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Static Footer Filepath

    you'd have to put it in an add-in and trap the app level workbookbeforeprint event

    add a class module called AppEvents to a new workbook and add this code

    Please Login or Register  to view this content.
    then in the ThisWorkbook module add
    Please Login or Register  to view this content.
    then save the workbook as an add-in

  8. #8
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Static Footer Filepath

    by the way in the original code this line
    Please Login or Register  to view this content.
    oughta be
    Please Login or Register  to view this content.
    ;-)

  9. #9
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    4,065

    Re: Static Footer Filepath

    Thanks for catching my "WS/Activesheet" error, and thanks so much for including the code for the global solution. I don't know whether I'll use it, as I can imagine there would be times she WOULDN'T want the file path on the worksheet, so on "on demand" macro would suit her better. But I'll let her make the final call.

    Thanks for all your help!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Trying to get the filepath on "Open", but get filepath of a temporary file instead
    By ianpwilliams in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-22-2013, 12:27 AM
  2. [SOLVED] Copying files from a selected filepath to a filepath mentioned in a worksheet's cell
    By subbby in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-10-2012, 03:59 PM
  3. Replies: 0
    Last Post: 08-03-2006, 04:15 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1