Hi macropod,
I placed the line of code in my FileSave() macro and it works but only after the file has been saved first. When I click on save a second time, the fields change! I'm not sure if this is the best code for saving a file for the first time because it certainly does not work if the user decides to click on Save As instead of Save.
Code:Sub FileSave()
Dim strfName
With ActiveDocument
If Len(.Path) = 0 Then
strfName = .ContentTypeProperties("RO").Value & Chr(32) & _
.CustomDocumentProperties("OfficeType").Value & Chr(32) & _
.ContentTypeProperties("Country(s)").Value & Chr(32) & _
.CustomDocumentProperties("ReportType").Value
.BuiltInDocumentProperties("Title").Value = strfName
With Dialogs(wdDialogFileSaveAs)
.Name = strfName & ".docx"
.Show
End With
Else
Call Document_ContentControlOnExit(ActiveDocument.SelectContentControlsByTitle("Visit Date - To")(1), False)
.Save
End If
End With
End Sub
Regards,
JDS_916
P.S I think the Save and Save As are both working now.