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 2007

Tip: Looking for answers? Try searching our database.

auto saving to a directory

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
jb914 - 23 Jan 2007 19:53 GMT
how do i create a macro to autosave a document to a particular
directory on my server?  the document is already named by another
program, so, it's a unique name.  the path is always static
z:\backup\documents\2007
Greg Maxey - 23 Jan 2007 20:20 GMT
This isn't tested because I don't have a server.  Try:
Sub NotTested()
Dim strFileName As String
strFileName = "Whatever unique name you use"
ActiveDocument.SaveAs FileName:="z:\backup\documents\2007\ &
strFileName"
End Sub

> how do i create a macro to autosave a document to a particular
> directory on my server?  the document is already named by another
> program, so, it's a unique name.  the path is always static
> z:\backup\documents\2007
jb914 - 23 Jan 2007 20:29 GMT
Thanks Greg,
The document name is going to be the current name of the active
document.  how do i get that automatically?

> This isn't tested because I don't have a server.  Try:
> Sub NotTested()
[quoted text clipped - 8 lines]
> > program, so, it's a unique name.  the path is always static
> > z:\backup\documents\2007
Greg Maxey - 23 Jan 2007 21:17 GMT
Something like this:

Sub Test()
Dim strFileName As String
strFileName = ActiveDocument.Name
End Sub

> Thanks Greg,
> The document name is going to be the current name of the active
[quoted text clipped - 12 lines]
> > > program, so, it's a unique name.  the path is always static
> > > z:\backup\documents\2007
Greg Maxey - 23 Jan 2007 20:21 GMT
Sorry, that should be:

ActiveDocument.SaveAs FileName:="z:\backup\documents\2007\" &
strFileName

> how do i create a macro to autosave a document to a particular
> directory on my server?  the document is already named by another
> program, so, it's a unique name.  the path is always static
> z:\backup\documents\2007
 
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.