Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    Michigan, USA, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Inserting Incremental Numbers (Win98/Word 2K)

    I am trying to work up a document that will print an admission number (starting at 0001 and incrementing by 1 to 1000) on a pre-printed form. I have been reading up on SEQ fields (SEQ count r 0001) and IF fields but have had no success with a macro that inserts number 0001, does a page break, inserts 0002, page break, etc. up to 1000.

    Does anyone have any ideas?

  2. #2
    BAM
    Guest

    Re: Inserting Incremental Numbers (Win98/Word 2K)

    Hi Jeanne,

    This article provides a couple of methods that you can use for this:
    <A target="_blank" HREF=http://www.mvps.org/word/FAQs/MacrosVBA/NumberDocs.htm>http://www.mvps.org/word/FAQs/MacrosVBA/NumberDocs.htm</A>
    ~~~~~~~~~~~~~~
    Cheers!

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    England
    Posts
    1,306
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inserting Incremental Numbers (Win98/Word 2K)

    I've probably misunderstood the query, but what's wrong with (in Word) View Header and Footer and then Page Number (an icon of a page with a #) or Insert AutoText for more elaborate options?

    If this isn't what you want, there's always Mail Merge...

  4. #4
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Oregon, USA
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inserting Incremental Numbers (Win98/Word 2K)

    Hi Jeanne,

    Does this do what you were trying to do with the macro?

    <pre>Sub NumPageBreak()
    Dim varCounter As Variant

    varCounter = 0
    For i = 1 To 1000
    varCounter = Format(varCounter + 1, "0000")
    Selection.TypeText varCounter
    Selection.InsertBreak (wdPageBreak)
    Next i
    End Sub
    </pre>


    HTH,

    Chris

  5. #5
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inserting Incremental Numbers (Win98/Word 2K)

    Hi, Jeanne -- the switches in your SEQ field are a bit off. The "r" switch means "reset numbering," and by following it with the 0001, you are specifying that it reset numbering to 0001 with you tell it "r 0001"

    If you will change that to # "0000" so that your code reads { SEQ count # "0000" } you'll find it will increment properly. However, I think MerC's suggestion has merit.

    HTH -- Good luck.
    Karen

  6. #6
    New Lounger
    Join Date
    Jan 2001
    Location
    Michigan, USA, USA
    Posts
    14
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inserting Incremental Numbers (Win98/Word 2K)

    This worked just like I wanted. Thanks so much!

Posting Permissions

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