If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Selecting Fields for Update
Using Word2000 on Windows 2000 Professional
I have set up a template for a form which uses a combination of text form fields and ASK fields. The AutoNew macro (code shown below) in the form asks users to respond to three ASK field prompts and then locks the form, which has a bunch of check box and text form fields for them to fill in. ***************************************** Sub AutoNew() ' ' AutoNew Macro ' Macro recorded 10/12/2004 by Steve to update ASK fields at document creation ' ' Selection.WholeStory Selection.Fields.Update ' Selection.HomeKey Unit:=wdStory ActiveDocument.Protect Password:="", NoReset:=False, Type:= _ wdAllowOnlyFormFields End Sub ***************************** I want users to have the option of editing the ASK fields again if they so desire, which requires unlocking the form. So, I added a macro which is buttonized on a custom toolbar, based on the AutoNew macro, to unlock the document, update the fields, reset the ref fields and relock the document. Note that the "NoReset" value in the second macro has been set to "True". ***************************** Sub ProtectUnprotect() ' ' ProtectUnprotect Macro ' ActiveDocument.Unprotect Selection.WholeStory Selection.Fields.Update Selection.HomeKey Unit:=wdStory ActiveDocument.Protect Password:="", NoReset:=True, Type:= _ wdAllowOnlyFormFields ActiveDocument.PrintPreview ActiveDocument.ClosePrintPreview End Sub ***************************** When this macro runs, any check boxes have been checked keep their values but if any form text fields have been filled in, they are reset to blank. How can I set it up so that the only things updated when I relock the form are the ASK fields, and all other field values remain as input by the user? Thanks. - Steve |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SELECTING ALL FIELDS FOR A UNION QUERY | jeanne | Running & Setting Up Queries | 2 | August 18th, 2006 04:29 PM |
Date form fields in Word 2003 | Andy | General Discussion | 1 | November 11th, 2004 11:06 AM |
Outlook Mapping Fields aren't saved | ericb | Contacts | 6 | September 4th, 2004 07:43 AM |
Optional Merge Fields | Pete Bennett | Mailmerge | 4 | August 25th, 2004 11:03 AM |
Mail Merge two fields that have multiple lines with new line control code | Eric Li | Mailmerge | 7 | May 25th, 2004 06:10 PM |