Enter tomorrows date in the header of a file upon open

stubs

New Member
Joined
Apr 5, 2006
Messages
41
I have a folder containing about 15 files that need to be printed daily, but need to contain the next day's date in the header.

Currently, I have been selecting all the doccuments together & sending them to the printer using the "Send to" option from the right click windows menu.. afterwhich, I maunally date them in ink.

Is there a way to automate the process.. i.e. enter tomorrows date into the heading, before it prints.

Just to note, I also have other text in the header such as page number, and document title.. can this be retained?


Thanks in advance.
Stu
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
I have a folder containing about 15 files that need to be printed daily, but need to contain the next day's date in the header.

Currently, I have been selecting all the doccuments together & sending them to the printer using the "Send to" option from the right click windows menu.. afterwhich, I maunally date them in ink.

Is there a way to automate the process.. i.e. enter tomorrows date into the heading, before it prints.

Just to note, I also have other text in the header such as page number, and document title.. can this be retained?


Thanks in advance.
Stu

Hi Stu,

I don't know if there is a way of formatting that in the Header/Footer option through Excel but I know it can be down with an Open Event Macro using the Header Property. Either LeftHeader, CenterHeader, or RightHeader respectively.

To keep what is already there use a variable like say MyHeader to read what is there then add the date to the end


MyHeader = Worksheets("Sheet1").PageSetup.LeftHeader
MyHeader = MyHeader & " "
Worksheets("Sheet1").PageSetup.LeftHeader = MyHeader & date + 1
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,243
Members
449,075
Latest member
staticfluids

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top