Setting the filename for 1. time save

B

Bo Rasmussen

Hi,

When we create a new document from a template, some fields are created. From
these fields the filename for the document can be set. When Save is selected
the first time it seems that the Title is used as a starting point. However
there's not much idea in having the Title equal to the filename. Is there a
way to tell word what it should use for filename ?

Regards
Bo Rasmussen
 
G

Greg

Bo,

Something like:

Sub FileSaveAs()
Dim oName As String
oName = ActiveDocument.Fields(1).Result
With Dialogs(wdDialogFileSaveAs)
.Name = oName
.Show
End With
End Sub

Will use the value in the first field in the document.
 

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