How to create a macro saving document with current date

E

Erick

Hi,

How can I create a Macro which will save my test.doc document in a given
directory "C:\briefing " like this: 20060109test.doc

Thanks for your help

Erick
 
D

Doug Robbins - Word MVP

ActiveDocument.SaveAs Format(Date, "yyyyMMdd") & ActiveDocument.Name

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
E

Erick

Thank you very much indeed but it saves the document in "My Documents"
directory....
Any tips to save it in a particular DIR having the following path:
c:\test\briefing?

Many thanks

Erick
 
D

Doug Robbins - Word MVP

Include the path in the following manner

ActiveDocument.SaveAs "Driveletter:\foldername\" & Format(Date, "yyyyMMdd")
& ActiveDocument.Name

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top