In that case you would need to unlock the form by macro in the form template
and apply the relevant new properties pertaining to the document, lock the
document and update the fields. This can all be achieved by macro.
The author will be set by default.
Are the the title and subject related to the content of the form? If so you
can pull the data from the relevant fields. If not you would need to prompt
for it. Something along the lines of
Dim i As Integer
Dim bProtected As Boolean
Dim sPassword As String
Dim sTitle As String
Dim sSubject As String
Dim oSection As Section
Dim oHeader As HeaderFooter
Dim oField As Field
sPassword = ""
'Unprotect the file
If ActiveDocument.ProtectionType <> wdNoProtection Then
bProtected = True
ActiveDocument.Unprotect _
Password:=sPassword
End If
'Do your thing
sTitle = InputBox("Enter the document title", _
"Document Title", _
ActiveDocument.BuiltInDocumentProperties("Title"))
'or e.g.
'sTitle = ActiveDocument.FormFields("Text1").Result
sSubject = InputBox("Enter the document subject", _
"Document Subject", _
ActiveDocument.BuiltInDocumentProperties("Subject"))
ActiveDocument.BuiltInDocumentProperties("Title") = sTitle
ActiveDocument.BuiltInDocumentProperties("Subject") = sSubject
With ActiveDocument
For Each oSection In ActiveDocument.Sections
For Each oHeader In oSection.Headers
If oHeader.Exists Then
For Each oField In oHeader.Range.Fields
oField.Update
Next oField
End If
Next oHeader
For Each oFooter In oSection.Footers
If oFooter.Exists Then
For Each oField In oFooter.Range.Fields
oField.Update
Next oField
End If
Next oFooter
Next oSection
End With
'Reprotect the document.
If bProtected = True Then
ActiveDocument.Protect _
Type:=wdAllowOnlyFormFields, _
NoReset:=True, _
Password:=sPassword
End If
http://www.gmayor.com/installing_macro.htm
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>