Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Apr 2003
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    File path in Footer (Office2000)

    Hi There,

    I have a relatively simple request, I would like to know what I should type in the custom footer field, so that the file directory path ie. H:MyDocumentssample.xls appears when I print the document. I know for example if I type in : & <img src=/S/disk.gif border=0 alt=disk width=15 height=15> the file name is printed.

    Regards,

  2. #2
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Weert, Limburg, Netherlands
    Posts
    4,812
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File path in Footer (Office2000)

    This can only be done using a macro.

    One option is to use the Before_print event of the workbook to set this path in the left footer of each sheet:

    1. OPen the VBE (Alt-F11)
    2. Find the workbook in the project explorer
    3. Expand it and double click the Thisworkbook entry
    4. At the top of the newly opened screen there are two dropdowns.
    5. select Workbook from the left one. Some default code will appear, delete it if not needed.
    6. Selecte BeforePrint from the righthand one. This code will show up:

    Private Sub Workbook_BeforePrint(Cancel As Boolean)

    End Sub

    Modify this so it looks like this:

    Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Dim oSheet As Worksheet
    For Each oSheet In ThisWorkbook.Worksheets
    oSheet.PageSetup.LeftFooter = ThisWorkbook.FullName
    Next
    End Sub
    Jan Karel Pieterse
    Microsoft Excel MVP, WMVP
    www.jkp-ads.com
    Professional Office Developers Association

  3. #3
    New Lounger
    Join Date
    Apr 2003
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: File path in Footer (Office2000)

    Excelent! thanks for that, worked a charm [img]/forums/images/smilies/ohmy.gif[/img])

    would never have come up with that myself

Posting Permissions

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