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