ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Connect document properties to headers and footers (https://www.excelbanter.com/excel-discussion-misc-queries/52942-connect-document-properties-headers-footers.html)

Jeroen

Connect document properties to headers and footers
 
Hi,

I'd like to fill in the document properties of the Excel document.
After i want to connect the properties to the headers and footers of the
excel file.
Now i have to change all the header and footers of the document myself.
Or does anyone have an other idea.

Thanx for the response.
--
Jeroen

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.

http://www.microsoft.com/office/comm...lic.excel.misc

Bob Phillips

Connect document properties to headers and footers
 
Private Sub Workbook_BeforePrint(Cancel As Boolean)
With ActiveSheet.PageSetup
.LeftHeader = ActiveWorkbook.BuiltinDocumentProperties("Subject" )
.LeftFooter = ActiveWorkbook.BuiltinDocumentProperties("Author")
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

RP
(remove nothere from the email address if mailing direct)


"Jeroen" wrote in message
...
Hi,

I'd like to fill in the document properties of the Excel document.
After i want to connect the properties to the headers and footers of the
excel file.
Now i have to change all the header and footers of the document myself.
Or does anyone have an other idea.

Thanx for the response.
--
Jeroen

----------------
This post is a suggestion for Microsoft, and Microsoft responds to the
suggestions with the most votes. To vote for this suggestion, click the "I
Agree" button in the message pane. If you do not see the button, follow

this
link to open the suggestion in the Microsoft Web-based Newsreader and then
click "I Agree" in the message pane.


http://www.microsoft.com/office/comm...lic.excel.misc




All times are GMT +1. The time now is 10:06 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com