Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2006

Tip: Looking for answers? Try searching our database.

How to create a macro saving document with current date

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Erick - 09 Jan 2006 22:01 GMT
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
Doug Robbins - Word MVP - 10 Jan 2006 05:18 GMT
ActiveDocument.SaveAs Format(Date, "yyyyMMdd") & ActiveDocument.Name

Signature

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

> Hi,
>
[quoted text clipped - 4 lines]
>
> Erick
Erick - 10 Jan 2006 21:41 GMT
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

> ActiveDocument.SaveAs Format(Date, "yyyyMMdd") & ActiveDocument.Name
>
[quoted text clipped - 14 lines]
> >
> > Erick
Doug Robbins - Word MVP - 11 Jan 2006 05:07 GMT
Include the path in the following manner

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

Signature

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

> Thank you very much indeed but it saves the document in "My Documents"
> directory....
[quoted text clipped - 24 lines]
>> >
>> > Erick
Erick - 11 Jan 2006 19:40 GMT
Thank you very much for your input Doug.
It really helps me.

Best regards,

Erick

> Include the path in the following manner
>
[quoted text clipped - 37 lines]
> >> >
> >> > Erick
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.