Results 1 to 10 of 10
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    Los Angeles
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    FILLIN UPDATES (2000)

    I've created a template document with FILLIN fields to prompt the user for info when creating a new doc. In options I have set on the Print tab - Update Fields checked (so that date and document name/path/ID are updated). The problem is that then the FILLIN fields prompt the user to answer the same questions again, or click cancel or something over and over.

    I've read the KB post (211597) and have added code in autonew to lock the fillin fields. Microsoft tells you to lock the fields by pressing CTRL F11... what does this do? Then, they tell you to add this code in autonew. (All of this seems to be addressing some problem that I don't even have.) I added the third line, and it works well, except now the date and doc ID fields won't update.

    Sub AutoNew()
    ActiveDocument.Fields.Locked = False
    ActiveDocument.Fields.Update
    ActiveDocument.Fields.Locked = True

    Is there anyway to lock specific fields in the document while leaving date and other document property fields unlocked?

    Thanks!

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: FILLIN UPDATES (2000)

    Hi David,

    You might find that a macrobutton field will give a better result, if you use it thus:
    {MACROBUTTON NoMacro "Type something here"}
    This works by using the macrobutton field to solicit input instead of firing a macro (hence Nomacro) and, as soon as they do, the field is erased. Voila! No field left to update.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILLIN UPDATES (2000)

    Hi David:
    I agree with macropod. However, if you want to use FILLIN fields & have them prompt once, but have other fields update upon printing, you can do the following (which is a modification of the KB article & use of a macro provided by Dave Rado, MVP):
    1. In your template, lock your FILLIN fields only by selecting them & pressing Ctrl+F11.
    2. Use the following AutoNew macro in your fillin template:
    <pre>Sub AutoNew()

    Dim Fld As Field

    ActiveDocument.Fields.Locked = False
    ActiveDocument.Fields.Update

    For Each Fld In ActiveDocument.Fields
    If Fld.Type = wdFieldAsk Or Fld.Type = wdFieldFillIn Then
    Fld.Locked = True
    End If
    Next Fld
    End Sub</pre>


    You could also unlink, rather than unlock, the fillin fields if you wanted.

    Cheers,

  4. #4
    Star Lounger
    Join Date
    Jan 2001
    Location
    Los Angeles
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILLIN UPDATES (2000)

    This worked perfectly! Thanks! (The macrobutton trick I am familiar with, but this document is very long and users would probably miss some fields and/or have to scroll all over the place to fill in the few items required.)

  5. #5
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: FILLIN UPDATES (2000)

    Hi David,

    Here's another solution, that doesn't rely on a macro - which might be preferable to user's getting macro warnings.

    1. In your template document, change each of the FILLIN fields to ASK fields in the following format:
    {QUOTE {IF{BkMrk} = "" {ASK BkMrk "Question"} ""}{BkMrk}}
    where BkMrk is a bookmark named to match the particular question that was previously asked in your FILLIN field.

    2. Then, at the start of each field, create a bookmark (ie Insert|Bookmark) corresponding to whatever you called BkMrk for that field.

    3. Save the template.

    Now, when the template is printed, users will only be prompted to update any ASK fields they haven't answered.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  6. #6
    Star Lounger
    Join Date
    Jan 2001
    Location
    Los Angeles
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILLIN UPDATES (2000)

    This is not working for me. I am inserting a field for each {} in your sample below with Ctrl F9. Do I need commas or something after the IF clause like Excel (IF 5 = A1, "yes", "no")?

  7. #7
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: FILLIN UPDATES (2000)

    Hi David,

    Check out the attached example.

    In it, the 1st para has the suggested field, using "Answer1" (without quotes) as the bookmark. As you see, no commas are needed - this is a quirk of Word's using IF in fields. If you select the para and press F9, you'll get ASKed for a response. If you enter something, you won't be ASKed again if the field is updated. If you don't enter anything, you will get ASKed again if the field is updated.

    Cheers
    Attached Files Attached Files
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  8. #8
    Star Lounger
    Join Date
    Jan 2001
    Location
    Los Angeles
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILLIN UPDATES (2000)

    It's working now (I had forgotten to add the autonew code to update fields) THANKS! David

  9. #9
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FILLIN UPDATES (2000)

    <P ID="edit" class=small>(Edited by Phil Rabichow on 24-Feb-03 15:12. to add the part below the --------)</P>THIS is an outstanding technique!! <img src=/S/bravo.gif border=0 alt=bravo width=16 height=30> The field can be saved as an autotext entry and placed wherever you would have used fillin fields in a template. Now we need a VBA expert to figure out a way to loop through such fields and change answer1 to answer2, answer3, etc. (and question1 to question2, etc.) and to add a corresponding bookmark at the beginning of the field. Perhaps nesting a SEQ field (just thinking out loud)...
    ----------------------
    I've been playing with this some more & creating a series of autotexts without a macro is also a workable solution. You could define a series of autotext entries such as:

    T{QUOTE{IF{Answer1}= "" {ASK Answer1 "Question"} ""}{Answer1}} ,where T represents a bookmark

    Then just enter the autotext entries where you want the fillin fields. You have to leave at least one space before the bookmark field (can be zero width) in order to include it as part of the autotext definition.

  10. #10
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: FILLIN UPDATES (2000)

    Thanks Phil,

    Automatic sequence numbering of the questions is easy enough by changing the field thus:
    {QUOTE{IF{"Answer{SEQ Answer#}"}= "" {ASK "Answer{SEQ Answer# c}" "Question"} ""}{"Answer{SEQ Answer# c}"}}
    Then you'd only need to create the matching sequential bookmarks - and re-word the question in each field to suit it's intended purpose. I'm not inclined to tackle that through VBA as I think it'd be more work than it's worth.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •