WORD template - sequential numbering

P

Pop`

dgk said:
I am trying to figure out how to use this template:
http://office.microsoft.com/en-ca/templates/TC012265191033.aspx. How
do I make 100 tickets and have the numbers automatically update?

Huh! Good question! I expected to see a macro in the template, or at least
some way to keep the numbering going for successive pages. It looks to me
like someone "forgot" something. There's a Black & White version of another
one too, with the same problem.

I've lost the source for where I got this, but here's a short blurb on
creating sequential numbers if it helps any.
-------------------
Make an AutoText entry as follows: In the body of any document, type the
brackets and the letter Q as regular text. Between the Q and the closing
bracket, insert a Sequence field, which supplies the number. Now select the
whole thing and press Alt+F3 and assign a name to the AutoText entry that
you wouldn't ordinarily use as a word, such as "qtag".

Each time you type that name in text, you'll see a yellow tooltip that says
"Press Enter to insert". Actually, you can press Enter, Tab, or F3, as any
of them will insert the AutoText entry.

If you insert new entries between existing ones, those that follow it don't
update automatically. You'll have to press Ctrl+A to select the whole
document and then press F9 to update the fields. (Alternatively, switch to
Print Preview and back.)

------------------------------------------



HTH,


Pop`
 
G

Guest

Thank you I will give that a try :)

Pop` said:
Huh! Good question! I expected to see a macro in the template, or at least
some way to keep the numbering going for successive pages. It looks to me
like someone "forgot" something. There's a Black & White version of another
one too, with the same problem.

I've lost the source for where I got this, but here's a short blurb on
creating sequential numbers if it helps any.
-------------------
Make an AutoText entry as follows: In the body of any document, type the
brackets and the letter Q as regular text. Between the Q and the closing
bracket, insert a Sequence field, which supplies the number. Now select the
whole thing and press Alt+F3 and assign a name to the AutoText entry that
you wouldn't ordinarily use as a word, such as "qtag".

Each time you type that name in text, you'll see a yellow tooltip that says
"Press Enter to insert". Actually, you can press Enter, Tab, or F3, as any
of them will insert the AutoText entry.

If you insert new entries between existing ones, those that follow it don't
update automatically. You'll have to press Ctrl+A to select the whole
document and then press F9 to update the fields. (Alternatively, switch to
Print Preview and back.)

------------------------------------------



HTH,


Pop`
 
G

Guest

I tried the Autotext and it worked except it prints the (Q#). How do I
aleviate the brackets and Q. Also do I have to do this 100 times for 100
tickets?
 
D

Doug Robbins - Word MVP

See the article "Sequentially numbering multiple copies of single document
using a macro" at:

http://www.word.mvps.org/FAQs/MacrosVBA/NumberCopiesOf1Doc.htm

or

See the article "Sequentially numbering multiple copies of single document
using a mailmerge" at:

http://www.word.mvps.org/FAQs/MailMerge/NumberCopiesOfDocMMerge.htm

or

See the article "Creating sequentially numbered documents (such as
invoices)" at:

http://www.word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm




--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
G

Guest

Wow - I will give those all a try - this is testing my WORD skills in areas I
have never gone before. Thanks for the info and the links to your website. I
will find the information helpful. dgk
 
I

iaglarch

I followed the instruction to create sequentially numbered documents (such as
invoices) and the first document opened with the macro enters the specific
number Order = 4209 instead of adding 1 + 4209. Can you tell me from the
attached macro what I am doing incorrectly?

Thanks,

Sub AutoNew()
'
' AutoNew Macro
' Macro created 5/14/2009 by VC of Finance
'
Order = System.PrivateProfileString("C:\Settings.Txt", "MacroSettings",
"Order")
If Order = "" Then
Order = 4209
Else
Order = Order + 1
End If

System.PrivateProfileString("C:Settings.txt", "MacroSettings", "Order") =
Order

ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "00#")
ActiveDocument.SaveAs FileName:="path" & Format(Order, "00#")


End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top