Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.word.newusers
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Automatic number increments

After the macro has run once, and created the text file, you can edit the
number in the file (just open it in NotePad).

--
Stefan Blom
Microsoft Word MVP



"prem" wrote in message
...
Hi I read through the article but I am not sure what to do.

Right now, My invoice number (201000795) is listed at the top right-hand
corner of the document. So do I highlight the number and then insert the
bookmark as mentioned??

And then do I enter the macro:

Sub AutoNew()

Order = System.PrivateProfileString("C:\Settings.Txt", _
"MacroSettings", "Order")

If Order = "" Then
Order = 1
Else
Order = Order + 1
End If

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

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

End Sub

Cause I tried that but nothing worked.

"Suzanne S. Barnhill" wrote:

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

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA
http://word.mvps.org

"prem" wrote in message
...
Hey guys, right now, I am using MS Word 2007 to issue receipts.
However,
I
have a little issue with this. Whenever I need to issue a new receipt,
I
have
to manually increase the receipt number by 1.

For example, the first receipt I issue might have the receipt number
"201001". When I need to issue the next receipt, I need to open the
file
and
manually increase the receipt number to "210102". Sometimes I forget to
do
this and this leads to a number of problems.

My question is, is it possible to make the receipt number update itself
automatically every time I open it, such that it automatically
increases
by 1?

Thank you in advance.

Regards,
Prem


.




 
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I disable automatic number insert niteravyn Microsoft Word Help 1 April 13th 08 09:18 PM
Number of Pages specified; Automatic Sizing bretsharon New Users 1 October 24th 07 03:59 PM
How insert automatic numbering field that increments when opening Lorraine Microsoft Word Help 1 January 10th 06 04:50 PM
How do I make an automatic number small caps under Number Format? grebop Microsoft Word Help 3 October 17th 05 05:31 AM
Automatic cap after a number JRT Microsoft Word Help 1 February 17th 05 12:04 AM


All times are GMT +1. The time now is 07:09 PM.

Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"