+ Reply to Thread
Results 1 to 2 of 2

Put file name and path on Excel template

  1. #1
    Registered User
    Join Date
    09-17-2003
    Location
    Scotland
    Posts
    59

    Put file name and path on Excel template

    Hi Folks

    Is there a way of changing the default template in Excel so that it will always put the file name, path and sheet name on in the Header/Footer section or is it necessary to record a macro to do this.

    thanks

    Shirley Munro

  2. #2
    Forum Expert Greg M's Avatar
    Join Date
    08-16-2007
    Location
    Dublin. Ireland
    MS-Off Ver
    Office 2016
    Posts
    4,497
    Hi Shirley,

    You can insert the file name & the worksheet name using Page Setup > Header/Footer > Custom Header etc., however I don't think you can insert the file path without using VBA - there's no formula which tells you the path of your workbook.

    Try inserting the following code in the "ThisWorkbook" VBA module of your workbook:

    Please Login or Register  to view this content.
    This will automatically insert the appropriate information in the page header of each worksheet before it is printed.

    If you want it to appear in the footer instead/as well, just use "LeftFooter" instead of/as well as "LeftHeader".

    Hope this helps - please let me know how you get on.

    Best regards,

    Greg M

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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