Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatic Date Stamping
Hi,
I have a macro that works out of an XL file which populates a Word template with charts. The macro then saves the template with a new name, using: With WDDoc .SaveAs ("C:\MyReport.doc") End With Is it possible to save the file with a custom date stamp (yyddmm) so that the file would be called something like "080404 MyReport.doc" I can then run the report the next day to produce 080405 MyReport.doc and so on. TIA Dave |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Automatic Date Stamping
On Apr 5, 12:01*am, Risky Dave
wrote: Hi, I have a macro that works out of an XL file which populates a Word template with charts. The macro then saves the template with a new name, using: With WDDoc * * * * .SaveAs ("C:\MyReport.doc") * * End With Is it possible to save the file with a custom date stamp (yyddmm) so that the file would be called something like "080404 MyReport.doc" I can then run the report the next day to produce 080405 MyReport.doc and so on. TIA Dave Hi Dave, You almost answered your own question! Just change .SaveAs ("C:\MyReport.doc") to .SaveAs ("C:\" & Format(Date(),"yyddmm") & " MyReport.doc") Cheers, Ivan. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Automatic date stamping | Excel Discussion (Misc queries) | |||
Date stamping a cell change | Excel Discussion (Misc queries) | |||
Date and time stamping with a (macro) button | Excel Worksheet Functions | |||
Date stamping based on cell value | Excel Programming | |||
Date and time stamping multiple cells for multiple entries. | Excel Worksheet Functions |