Saving Files

D

Donhuff

I actually have 2 questions:

1. I want to run a MACRO that opens a "save as" window so I can browse to a
location and enter a file name (similar to get saveas in Excel VBA). How do
I do that?

2. I have MACROs that open different word files, but remain on the current
word document. How do I get the MACRO to display the opened file?

sample MACRO is:

ChangeFileOpenDirectory
"C:\users\dhuffaker\Documents\xmydata\CorpExam\Corp\"
Documents.Open FileName:="DOR.doc", ConfirmConversions:=False,
ReadOnly:= _
False, AddToRecentFiles:=False, PasswordDocument:="",
PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:="",
WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto, XMLTransform:=""
 
J

Jacob Skaria

Dear Donhuff

To display the save as window use
Application.Dialogs(wdDialogFileSaveAs).Show

If this helps click Yes
 
J

Jacob Skaria

Sorry to your second question

Dim wrdDoc As Word.Document
Set wrdDoc = Documents.Open("c:\1.doc")
wrdDoc.Activate

If this post helps click Yes
 

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

Similar Threads


Top