"Save to two locations" macro

J

jknapp1005

I used the gmayor macro to save a document to two locations at once. It
worked wonderfully. However, with each file it saves, it puts the word
"Backup" in front of each file. Is there any way I can get around that?
 
J

Jean-Guy Marcil

jknapp1005 was telling us:
jknapp1005 nous racontait que :
I used the gmayor macro to save a document to two locations at once.
It worked wonderfully. However, with each file it saves, it puts the
word "Backup" in front of each file. Is there any way I can get
around that?

Go into the code, find the Word "Backup" ( and possibly a trailing space),
and delete it.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
G

Graham Mayor

Actually it doesn't. It only puts backup in front of the copy. You can
change this by removing Backup space after the blue text.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
S

Sorting data

I tried Graham's macro and it works great. Is there a veraion for Excel? I
tried changing Document references to Workbook but this did not allow me to
choose the initial file location for new documents as the word version does.
(obviously the backup location is determined by the file location entered in
the macro)
 
G

Graham Mayor

The macro would be essentially the same

Sub SaveToTwoLocations()
Dim strFileA As String
Dim strFileB As String
Dim strFileC As String
ActiveWorkbook.Save
strFileA = ActiveWorkbook.Name

'Define backup path shown in blue below
strFileB = "D:\My Documents\Test\Versions\Backup " & strFileA
strFileC = ActiveWorkbook.FullName
ActiveWorkbook.SaveAs Filename:=strFileB
ActiveWorkbook.SaveAs Filename:=strFileC
End Sub


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - 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