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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Egress1

Active Member
Joined
Mar 2, 2003
Messages
420
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
 

Forum statistics

Threads
1,143,637
Messages
5,719,966
Members
422,251
Latest member
bonebreaker100

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
Top