Setting the filename for 1. time save

  • Thread starter Thread starter Bo Rasmussen
  • Start date Start date
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
 
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.
 
Back
Top