Default Save Name

C

Charles A. Lackman

With WrdApp
..Documents.Open("C:\My Documents\MyDoc.doc", missing, missing, missing,
missing, missing, missing, missing, missing, missing, missing, missing)
..Selection.Paste()
..Visible = True
..Activate()
..NormalTemplate.Saved = True
End With

When the user goes to save the document it defaults to MyDoc.doc, is
there a way to change the name (programmatically) that will default to a
different name instead of MyDoc.doc.
 
J

Jay Freedman

Charles said:
With WrdApp
.Documents.Open("C:\My Documents\MyDoc.doc", missing, missing,
missing, missing, missing, missing, missing, missing, missing,
missing, missing)
.Selection.Paste()
.Visible = True
.Activate()
.NormalTemplate.Saved = True
End With

When the user goes to save the document it defaults to MyDoc.doc, is
there a way to change the name (programmatically) that will default
to a different name instead of MyDoc.doc.

See http://word.mvps.org/FAQs/MacrosVBA/ChangeSaveAsPath.htm, at the bottom
of the page where it says "If you want to have the dialog preloaded with a
different file name".

Since you appear to be automating Word from VB.Net, you may need to know
that the constant wdDialogFileSaveAs has the value 84 or &H54.
 
Top