Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    WNC USA
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Help with Word Forms

    Does anyone know of a way to control the direction or order of the tab key when using a Word form. The form has been established in a table and is protected. As you know, the default direction of the tab key in a table is left to right then down. We need to define the direction and VBA is not an option.

    Chance

  2. #2
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Oklahoma, Oklahoma, USA
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Word Forms

    I grabbed this from the Help File - perhaps it gives you some ideas. This method does include macros though so perhaps is excluded by your phrase "VB is not an option", but it's all I've got to offer. [img]/w3timages/icons/grin.gif[/img]


    <hr>The TAB key doesn't move the insertion point to the correct form field.
    Depending on how your form is designed, the TAB key may not move the insertion point to the correct form field. You can specify that the insertion point automatically moves from one form field to another by using an on-exit macro.
    How?

    Automate your form
    Any macro saved in the form template can run automatically when the insertion point enters or exits a form field. For example, if a user selects a Married check box, an exit macro could activate other related fields, such as Name of Spouse.

    For information about writing macros in Visual Basic that customize the behavior of ActiveX controls, click .

    Open the template that contains the form you want to change.


    Remove protection from the form template by clicking Protect Form on the Forms toolbar.


    Create the macros you want to use, and store them in the form template.
    If another template contains macros you want to use, copy them into the form template.

    How?

    Double-click the form field you want to assign a macro to.


    To run a macro when the insertion point enters the form field, click the macro in the Entry box.
    To run a macro when the insertion point exits the form field, click the macro in the Exit box.

    Note If you store the entry and exit macros in your Normal template and then distribute a form to others, the entry and exit macros may not run because the macros won't be available to the users. You must store macros you use in the form in the form template.<hr>

  3. #3
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    St. George, Maine, USA
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Word Forms

    *** Geoff W. URL markup added ***

    Look at Q159898

    <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q159/8/96.ASP>http://support.microsoft.com/support/kb/ar...s/Q159/8/96.ASP</A>

    Works with 97 & 2000.

  4. #4
    Star Lounger
    Join Date
    Jan 2001
    Location
    WNC USA
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Word Forms

    Thanks phanks .... I think I can use this since it should be transparent to the users who are barely computer literate. BobD's suggestion is essentially the same. I've tried it but am running into a error in code that I can't seem to figure out what causing it. See my post below please.

  5. #5
    Star Lounger
    Join Date
    Jan 2001
    Location
    WNC USA
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Word Forms

    Bob Thanks for your response .... I've tried this but am running into a code error that I can't seem to troubleshoot. See my post below please for details.

    Chance

  6. #6
    Star Lounger
    Join Date
    Jan 2001
    Location
    WNC USA
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Word Forms

    Here's the test code ....
    Sub TabOrder()
    Dim sTabTo As String
    Dim dlgForm As Dialog
    Set dlgForm = Dialogs(wdDialogFormFieldOptions)
    Select Case LCase(dlgForm.Name)
    Case "Text1"
    sTabTo = "Text2"
    Case "Text2"
    sTabTo = "Text3"
    Case "Text3"
    sTabTo = "Text4"
    Case "Text4"
    sTabTo = "Text5"
    Case "Text5"
    sTabTo = "Text6"
    Case "Text6"
    sTabTo = "Text7"
    Case "Text7"
    sTabTo = "Text8"
    Case "Text8"
    sTabTo = "Text9"
    Case "Text9"
    sTabTo = "Text10"
    Case "Text10"
    sTabTo = "Text11"
    Case "Text11"
    sTabTo = "Text12"
    Case "Text12"
    sTabTo = "Text13"
    Case "Text13"
    sTabTo = "Text14"
    Case "Text14"
    sTabTo = "Text15"
    Case "Text15"
    sTabTo = "Text16"
    Case "Text16"
    sTabTo = "Text17"
    Case "Text17"
    sTabTo = "Text18"
    Case "Text18"
    sTabTo = "Text1"
    Case Else
    End Select
    ActiveDocument.Bookmarks(sTabTo).Select
    End Sub

    It hangs up on ActiveDocument.Bookmarks(sTabTo).select. The error is "Requested member of the collection does not exist." as soon as I tab from Text1 form field. I've double checked each of the bookmarks in each of the form fields and all seem to be spelled correctly and match code references. There is also a bookmark set in each form field. Any ideas????

    I appreciate your help ....

  7. #7
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    St. George, Maine, USA
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Word Forms

    Please reread Q159896 and you will see:

    Note: Each Case statement below should be in all lower case.

    Replace yours with something like the below:

    Sub TabOrder()
    '
    ' TabOrder Macro
    ' Macro created 02/22/01
    '
    Dim sTabTo As String
    Dim dlgForm As Dialog
    Set dlgForm = Dialogs(wdDialogFormFieldOptions)
    Select Case LCase(dlgForm.Name)
    Case "text1"
    sTabTo = "text2"
    Case "text2"
    sTabTo = "text3"
    Case "text3"
    sTabTo = "text4"
    Case "text4"
    sTabTo = "text1"
    Case Else
    End Select
    ActiveDocument.Bookmarks(sTabTo).Select
    End Sub

    This works for me w/Word97.

  8. #8
    Star Lounger
    Join Date
    Jan 2001
    Location
    WNC USA
    Posts
    89
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Word Forms

    Thanks Bob .... got it working just fine now ... I had thought it might have something to do with the case and had tried to make that change ... but what I also need to do is to have lower case for the bookmark field name in the field properties. When I made both lower case it worked.

    Thanks again ......Chance

  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: Help with Word Forms

    Hi Bob:

    I have a question. Why do you have to use lowercase for "text1", etc. since the bookmark obstensibly uses "Text1".

    Thanks.

  10. #10
    2 Star Lounger
    Join Date
    Jan 2001
    Location
    St. George, Maine, USA
    Posts
    158
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Word Forms

    Phil,

    Only the Case statement needs lower case as shown by the note in Q159896.
    "Note: Each Case statement below should be in all lower case. "
    Case "text1"
    As I dislike typing I use copy/paste extensively.
    The lines below produce the same results in the macro I posted above.
    sTabTo = "text2"
    sTabTo = "Text2"

    No changes to default bookmark names were done. They are still Text1, . . .

    Case "Text1" - give the error while
    Case "text1" - executes properly. That's all I know.

    Bob_D

  11. #11
    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: Help with Word Forms

    It needs to be lower case because of the way MS designed it:

    ...
    Select Case LCase(dlgForm.Name)
    ...

    I guess this was to avoid case mismatches, but...

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

    Re: Help with Word Forms

    Thanks, Bob. Maybe some day I'll get around to learning VBA. Something to do in my spare time.[img]/w3timages/icons/grin.gif[/img]

  13. #13
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Word Forms

    Phil,

    It seems like heavy stuff, but, to my mind, it's WELL worth it.

    You can do so much with Word with the extra help from VBA.

    I first got switched on to VBA for Word when my wife came home from her travel agency, and told me how they generated standard letters for her travel agency just by entering a few fields. I had never realised (5 years ago) that something like that was possible from Word.

    Since then, I've produced a standard set of forms for our users, where common details (name, phone, address, etc) are filled in automatically. If they change any fields, those changes are reflected in the next form they fill in.

    It wan't that hard to achieve. The quantum leap was to get the idea that it could be done.

    With some knowledge, and lots of ideas, you can achieve heaps.

    Just some thoughts
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

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

    Re: Help with Word Forms

    Hi Geoff:

    Thanks for the encouragement. I know you're right. I'll probably take the plunge this summer.

  15. #15
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Help with Word Forms

    It'll probably because a part of the VBE engine is using the string literally, in which case (ugh!) "Text" is quite different from "text".

    I hate it when an application forces case-sensitive in one part and is insensitive in another. That may be what you've discovered.

Page 1 of 2 12 LastLast

Posting Permissions

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