Results 1 to 10 of 10
  1. #1
    Lounger
    Join Date
    Jun 2002
    Location
    Placerville, California, USA
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ASK w/REF and Text Form Fields (Word 2000)

    Creating a template in Word 2000 and need to use both the ASK and REF fields, and also plain text form field fill-ins. I create a simple macro stored inside of this template to select the document, F9, and unselect (to get the prompts and return cursor to the top of document), protect and save, when I use it as a template, when I use it I get a Runtime 4605 Error. Any suggestions?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ASK w/REF and Text Form Fields (Word 2000)

    Typically that kind of error dialog gives you the option to debug. Click that, and tell us what command is highlighted in the editor? That should give us an idea of what is causing the problem.

  3. #3
    Lounger
    Join Date
    Jun 2002
    Location
    Placerville, California, USA
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ASK w/REF and Text Form Fields (Word 2000)

    When you try to use the dialog box the error: Runtime Error 4605: This method or property is not available because the document is a protected document. The line in visual code that is hightlighted is Selection.WholeStory. With my limited visual basic knowledge I think this is because in order to get the pop-up boxes for the ASK/REF fields you need to select the form and press F9, but to use the text form fill-in fields the document has to be protected. I am trying to use both of these type of fields in the same document without the user having to unprotect, select the document, F9, the protect the document again. That is exactly what I have ask the macro (which I stored in the template) to do. Hopefully this makes sense!

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: ASK w/REF and Text Form Fields (Word 2000)

    You can substitute this:

    <pre>ActiveDocument.StoryRanges(wdMainTextStory).S elect</pre>

    You also can target individual fields like this:

    <pre>With ActiveDocument
    .Fields(2).Update 'update the first ASK
    .Fields(1).Update 'update the first REF to pick up the above info
    'etc.
    End With</pre>

    Hope this helps.

  5. #5
    Lounger
    Join Date
    Jun 2002
    Location
    Placerville, California, USA
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ASK w/REF and Text Form Fields (Word 2000)

    Thanks, I used the substitution you suggested and that allowed for the ASK and REF fields to work correctly, however, I am still having the problem to now get the text form fields to work. If I manually lock the document after the macro runs then the text form fields are enabled. Is there anyway to add this into the macro also?

  6. #6
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: ASK w/REF and Text Form Fields (Word 2000)

    Are you using formfields in a protected form or just as a way of prompting for text? If the latter, consider using macrobuttons instead. People can use the F11 key to jump to the next field, etc.
    Charles Kyle Kenyon
    Madison, Wisconsin

  7. #7
    Lounger
    Join Date
    Jun 2002
    Location
    Placerville, California, USA
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ASK w/REF and Text Form Fields (Word 2000)

    I am using the ASK and REF fields to prompt since the same information is located in multiple places in the form. I am using the plain text form fields where there is only one occurance of the information and don't really want the pop up boxes. I have never tried microbuttons, I will have to find some info to research this. Thanks!

  8. #8
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,048
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: ASK w/REF and Text Form Fields (Word 2000)

    Charles Kyle Kenyon
    Madison, Wisconsin

  9. #9
    Lounger
    Join Date
    Jun 2002
    Location
    Placerville, California, USA
    Posts
    40
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ASK w/REF and Text Form Fields (Word 2000)

    Well, I tried this and I am either not getting it or it is not going to work for what I am trying to accomplish. This form needs to be protected so that the users can only change the designated areas. Can't seem to protect it and have it work correctly with these macro buttons. Also, haven't found how to "click and type" on one macro button and then have it automatically fill in another area on the form.

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

    Re: ASK w/REF and Text Form Fields (Word 2000)

    I haven't been following this entire thread, but macrobuttons are an alternative to a protected form. However, if you want to use a protected form because you are using {REF} fields to repeat text, then you can't use macrobuttons.

Posting Permissions

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