How to insert File Properties into the page footer

  • Thread starter Thread starter Adnan
  • Start date Start date
A

Adnan

Hi,

Is it possible to insert automatically whatever value is under File >
Properties > Subject to the page footer?

Something like, for instance to insert file path you would go by using
&[File] or for sheet name you would use &[Tab], So is there any such way, or
workaround for file properties (Subject Field)?

Your help is much appreciated,
Adnan
 
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.leftfootere = ActiveWorkbook.BuiltinDocumentProperties("Subject")
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code
 
Bob,

It worked. Thank you so much!
Adnan


Bob Phillips said:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftFooter = ActiveWorkbook.BuiltinDocumentProperties("Subject")
End With
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code

--
__________________________________
HTH

Bob

Adnan said:
Hi,

Is it possible to insert automatically whatever value is under File >
Properties > Subject to the page footer?

Something like, for instance to insert file path you would go by using
&[File] or for sheet name you would use &[Tab], So is there any such way,
or
workaround for file properties (Subject Field)?

Your help is much appreciated,
Adnan
 
Back
Top