Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 161
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 141
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic date stamping PK Excel Discussion (Misc queries) 16 December 13th 09 10:04 PM
Date stamping a cell change Mustang Excel Discussion (Misc queries) 3 July 15th 09 11:17 PM
Date and time stamping with a (macro) button ArcticWolf Excel Worksheet Functions 4 July 10th 08 12:26 PM
Date stamping based on cell value Bob Excel Programming 6 February 1st 07 03:59 PM
Date and time stamping multiple cells for multiple entries. Gerald Excel Worksheet Functions 1 May 9th 06 01:45 PM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"