Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Word 2003 Form with unprotected doc properties?
Hi
I have a form with different form objects and it's working as it should. My problem is that when I protect the document it also protects the document properties and the fields i my document header that is using filds from the properties. Is it possible to "unprotect" the properties and the header? Regards Thomas Svensson |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Word 2003 Form with unprotected doc properties?
Switching to Print Preview and then back to your favorite view would update
fields in the header. -- Stefan Blom Microsoft Word MVP "Thomas Svensson" Thomas wrote in message ... Hi I have a form with different form objects and it's working as it should. My problem is that when I protect the document it also protects the document properties and the fields i my document header that is using filds from the properties. Is it possible to "unprotect" the properties and the header? Regards Thomas Svensson |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Word 2003 Form with unprotected doc properties?
Hi
Thank you for responding. You suggestion updates the fields in the header, but how can I enter information in the property fields? When opening up the property dialog box, all property fields are greyed out due to that the document is protected. Is there a way to "unprotect" these? /Thomas "Stefan Blom" skrev: Switching to Print Preview and then back to your favorite view would update fields in the header. -- Stefan Blom Microsoft Word MVP "Thomas Svensson" Thomas wrote in message ... Hi I have a form with different form objects and it's working as it should. My problem is that when I protect the document it also protects the document properties and the fields i my document header that is using filds from the properties. Is it possible to "unprotect" the properties and the header? Regards Thomas Svensson |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Word 2003 Form with unprotected doc properties?
You cannot update them while the form is protected. What information do you
wish to place in the properties and to what end? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Thomas Svensson wrote: Hi Thank you for responding. You suggestion updates the fields in the header, but how can I enter information in the property fields? When opening up the property dialog box, all property fields are greyed out due to that the document is protected. Is there a way to "unprotect" these? /Thomas "Stefan Blom" skrev: Switching to Print Preview and then back to your favorite view would update fields in the header. -- Stefan Blom Microsoft Word MVP "Thomas Svensson" Thomas wrote in message ... Hi I have a form with different form objects and it's working as it should. My problem is that when I protect the document it also protects the document properties and the fields i my document header that is using filds from the properties. Is it possible to "unprotect" the properties and the header? Regards Thomas Svensson |
#5
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Word 2003 Form with unprotected doc properties?
Hi
The header consists among other information fields as Author, Title and Subject that is from the doc properties. I have to follow our corporate document policy for the layout ant content of the header /Thomas "Graham Mayor" skrev: You cannot update them while the form is protected. What information do you wish to place in the properties and to what end? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Thomas Svensson wrote: Hi Thank you for responding. You suggestion updates the fields in the header, but how can I enter information in the property fields? When opening up the property dialog box, all property fields are greyed out due to that the document is protected. Is there a way to "unprotect" these? /Thomas "Stefan Blom" skrev: Switching to Print Preview and then back to your favorite view would update fields in the header. -- Stefan Blom Microsoft Word MVP "Thomas Svensson" Thomas wrote in message ... Hi I have a form with different form objects and it's working as it should. My problem is that when I protect the document it also protects the document properties and the fields i my document header that is using filds from the properties. Is it possible to "unprotect" the properties and the header? Regards Thomas Svensson |
#6
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Word 2003 Form with unprotected doc properties?
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 My web site www.gmayor.com Word MVP web site http://word.mvps.org Thomas Svensson wrote: Hi The header consists among other information fields as Author, Title and Subject that is from the doc properties. I have to follow our corporate document policy for the layout ant content of the header /Thomas "Graham Mayor" skrev: You cannot update them while the form is protected. What information do you wish to place in the properties and to what end? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Thomas Svensson wrote: Hi Thank you for responding. You suggestion updates the fields in the header, but how can I enter information in the property fields? When opening up the property dialog box, all property fields are greyed out due to that the document is protected. Is there a way to "unprotect" these? /Thomas "Stefan Blom" skrev: Switching to Print Preview and then back to your favorite view would update fields in the header. -- Stefan Blom Microsoft Word MVP "Thomas Svensson" Thomas wrote in message ... Hi I have a form with different form objects and it's working as it should. My problem is that when I protect the document it also protects the document properties and the fields i my document header that is using filds from the properties. Is it possible to "unprotect" the properties and the header? Regards Thomas Svensson |
#7
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Word 2003 Form with unprotected doc properties?
Thanks a lot. This will do the trick for me.
/Thomas "Graham Mayor" skrev: 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 My web site www.gmayor.com Word MVP web site http://word.mvps.org Thomas Svensson wrote: Hi The header consists among other information fields as Author, Title and Subject that is from the doc properties. I have to follow our corporate document policy for the layout ant content of the header /Thomas "Graham Mayor" skrev: You cannot update them while the form is protected. What information do you wish to place in the properties and to what end? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Thomas Svensson wrote: Hi Thank you for responding. You suggestion updates the fields in the header, but how can I enter information in the property fields? When opening up the property dialog box, all property fields are greyed out due to that the document is protected. Is there a way to "unprotect" these? /Thomas "Stefan Blom" skrev: Switching to Print Preview and then back to your favorite view would update fields in the header. -- Stefan Blom Microsoft Word MVP "Thomas Svensson" Thomas wrote in message ... Hi I have a form with different form objects and it's working as it should. My problem is that when I protect the document it also protects the document properties and the fields i my document header that is using filds from the properties. Is it possible to "unprotect" the properties and the header? Regards Thomas Svensson |
#8
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Word 2003 Form with unprotected doc properties?
You are welcome
-- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Thomas Svensson wrote: Thanks a lot. This will do the trick for me. /Thomas "Graham Mayor" skrev: 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 My web site www.gmayor.com Word MVP web site http://word.mvps.org Thomas Svensson wrote: Hi The header consists among other information fields as Author, Title and Subject that is from the doc properties. I have to follow our corporate document policy for the layout ant content of the header /Thomas "Graham Mayor" skrev: You cannot update them while the form is protected. What information do you wish to place in the properties and to what end? -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Thomas Svensson wrote: Hi Thank you for responding. You suggestion updates the fields in the header, but how can I enter information in the property fields? When opening up the property dialog box, all property fields are greyed out due to that the document is protected. Is there a way to "unprotect" these? /Thomas "Stefan Blom" skrev: Switching to Print Preview and then back to your favorite view would update fields in the header. -- Stefan Blom Microsoft Word MVP "Thomas Svensson" Thomas wrote in message ... Hi I have a form with different form objects and it's working as it should. My problem is that when I protect the document it also protects the document properties and the fields i my document header that is using filds from the properties. Is it possible to "unprotect" the properties and the header? Regards Thomas Svensson |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Spellcheck Unprotected Form Fields | Microsoft Word Help | |||
BUG: Protected document properties are UNprotected at Explorer window | Microsoft Word Help | |||
Why can't users unlock the unprotected WORD form I created? | Microsoft Word Help | |||
How to use checkboxes in an unprotected form? | Microsoft Word Help | |||
How to use checkboxes in an unprotected form? | Microsoft Word Help |