View Single Post
  #2   Report Post  
Jay Freedman
 
Posts: n/a
Default

Hi Scott,

There is no substitute for a macro that unprotects the document, does
the update, and reprotects. However, you don't need to convert
anything to regular text. As explained at
http://www.word.mvps.org/FAQs/Macros...lfResetOff.htm, the
Protect method in VBA has an optional NoReset parameter that prevents
it from clearing fields that already have values.

ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True

There is no equivalent of this parameter when you use the menu and
dialogs, and that means it will never appear in purely recorded macros
either.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org

On 8 Jan 2005 07:50:08 -0800, "Scott Cooper"
wrote:

I know this has been posted a few times but I thought I'd check to see
if anyone has come up with a viable solution or alternative yet.

Basically, I have a document with a standardized cover page,
information page, TOC, and procedures for performing a task. The cover
page is a protected section with form fields that allow users to update
basic information a/b the document (i.e. revision history, ect). The
rest of the document is broken into various protected and unprotected
sections, based on what I want the user to be able to modify.

Preferably, I want to be able to automatically update the TOC when the
document is saved, opened, or some other routine operation. Having to
manually update it is fine too. Just as some others in the newsgroup
have done, I have made the section that contains the TOC unprotected
but still can't update it when the document is locked.

The only solution I have seen posted is to use a macro to unprotect the
document, update the TOC, and re-protect the document. This is not a
viable solution for me b/c it erases the information that I want to
preserve in the form fields like my revision history, etc.

The only thing I can think of is maybe using a macro as described but
adding a step to convert the text in the form fields to regular text in
the document before re-protecting it.

Does anyone know how to do this? or has anyone come up with a
solution?

Thanks,

Scott