Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Levin, Manawatu-Wanganui, New Zealand
    Posts
    324
    Thanks
    9
    Thanked 28 Times in 26 Posts

    Mixing ASK, Fillin and autonew

    Hi
    Word 2000 SR1
    Hi Folks
    I need a template with a combination of ask, ref & fillin fields.
    I thought a macro named autonew would allow me to select whole doc and update the fields however I find

    On creating the new doc the fillin field prompts execute then the autonew kicks in and updates all fields including the fillins for a second time.

    What am I doing wrong ?

    Cheers
    Geof

  2. #2
    BAM
    Guest

    Re: Mixing ASK, Fillin and autonew

    Hi Geof,

    Prior to Word 97 you had to create an AutoNew macro for Fill-in fields to prompt. It is still necessary to create an AutoNew macro for Ask fields to prompt.

    So...the Fill-in fields automatically prompt, then the AutoNew macro updates the Fill-in fields again.

    My recommendation is to use one or the other, or my personal preference is to use <A target="_blank" HREF=http://www.mvps.org/word/FAQs/Userforms/CreateAUserForm.htm>Userforms</A>, but you can accomplish what you want without a macro(s) by using Fill-in fields.

    If you are using the Ask field for the purpose of cross-referencing the information then:
    - Insert your Fill-in field(s)
    - Use <Alt F9> to toggle the field codes
    - Select the Fill-in field you want to cross-reference
    - Go to Insert/Bookmark and add a bookmark
    - Insert your cross-reference to the bookmark

    Also, you might want to take a look at this <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=wrd&Number=36508&page=& view=&sb=&vc=1#Post36508> thread</A> for additional information/ideas.
    ~~~~~~~~~~~~
    Cheers!

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

    Re: Mixing ASK, Fillin and autonew

    Hi Geof,

    You aren't doing anything wrong, you're just expecting rational behavior from Word!

    The FILLIN field updates automatically upon the creation of a new document. The ASK field requires the AutoNew macro. You can have it update all fields except the FILLIN fields, or you can use all ASK fields.

    Note also that any fields in headers/footers will not be updated by a general update all fields command. If you need code to update fields in headers/footers, write back.

    You may want to download the following from <A target="_blank" HREF=http://www.addbalance.com/word/download/index.htm>my download page</A> (addbalance.com/word/download/) and take a look at them.
    AskForm and UserForm (These are both designed as tutorials with the VBA unlocked.)

    Hope this helps.
    Charles Kyle Kenyon
    Madison, Wisconsin

  4. #4
    3 Star Lounger
    Join Date
    Apr 2001
    Location
    Levin, Manawatu-Wanganui, New Zealand
    Posts
    324
    Thanks
    9
    Thanked 28 Times in 26 Posts

    Re: Mixing ASK, Fillin and autonew

    Thanks for the ideas and the references ..

    I think I have got around the problem like this

    sub autonew
    For each field in activedocument.fields
    field.update
    next
    end sub

    If this doesnt work then back to userforms ...

    Many thanks
    I find your sites very useful and appreciate the lounge immensely

    Geof

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

    Re: Mixing ASK, Fillin and autonew

    Rather than a loop, you could try:
    activedocument.Fields.Update
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

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

    Re: Mixing ASK, Fillin and autonew

    So long as none of the fields are in headers/footers (or textboxes) either of these will work.
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

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