Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Thomas Svensson Thomas Svensson is offline
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Thomas Svensson[_2_] Thomas Svensson[_2_] is offline
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Thomas Svensson[_2_] Thomas Svensson[_2_] is offline
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Thomas Svensson[_2_] Thomas Svensson[_2_] is offline
external usenet poster
 
Posts: 3
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Spellcheck Unprotected Form Fields Dax Arroway Microsoft Word Help 0 July 24th 07 07:22 PM
BUG: Protected document properties are UNprotected at Explorer window danieldc Microsoft Word Help 0 March 21st 07 04:59 PM
Why can't users unlock the unprotected WORD form I created? Janine Microsoft Word Help 2 May 24th 06 09:49 PM
How to use checkboxes in an unprotected form? barbara K Microsoft Word Help 4 April 28th 05 02:43 PM
How to use checkboxes in an unprotected form? bkerrigan100 Microsoft Word Help 1 April 4th 05 12:08 AM


All times are GMT +1. The time now is 12:31 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"