Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Multiple save macro

2 views
Skip to first unread message

Janine

unread,
Feb 24, 2003, 1:39:25 PM2/24/03
to
I am trying to create a macro in Word that will save my
document in two different folders, allowing me to name
it.

The goal is that when I invoke the macro, the save dialog
would pop up twice and I'd be able to name it. So far, I
can only get it to save in two folders with the file name
hard coded into the macro. In other words, no save dialog
box at all.

I am teaching myself to program, so I don't have peers to
draw on. Thanks a bunch!

Janine

Dave Lett

unread,
Feb 24, 2003, 2:09:45 PM2/24/03
to
Hi Janine,

I think you can use the following:

With Dialogs(wdDialogFileSaveAs)
.Show
.Show
End With


HTH

"Janine" <jan...@j9design.net> wrote in message
news:052901c2dc34$0e098430$a301...@phx.gbl...

Mark Baird

unread,
Feb 24, 2003, 11:42:28 PM2/24/03
to
If you only want to prompt the user once. You can the name of the file from
the FileSaveAs dialog.

If the folders vary then use Dave Lett's solution.

Dim sFile As String
Dim sFirstPath As String
Dim sSecondPath As String

With Dialogs(wdDialogFileSaveAs)
.Show
sFile = .Name
End With

sFirstPath = "C:\" & sFile

ActiveDocument.SaveAs FileName:=sFile, FileFormat:=wdFormatDocument, _
LockComments:=False, Password:="", AddToRecentFiles:=True,
WritePassword _
:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:=False, _
SaveNativePictureFormat:=False, SaveFormsData:=False,
SaveAsAOCELetter:= _
False

sSecondPath = "D:\" & sFile

ActiveDocument.SaveAs FileName:=sFile


Mark Baird


"Janine" <jan...@j9design.net> wrote in message
news:052901c2dc34$0e098430$a301...@phx.gbl...

0 new messages