#1   Report Post  
Posted to microsoft.public.word.docmanagement
grandpappajim grandpappajim is offline
external usenet poster
 
Posts: 3
Default serial numbering

I want to print a batch of three part NCR invoices. how do I get the serial
numbers to enter automaticaly?
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default serial numbering

Are you printing the three parts separately, or are you using an impact
printer to print all three together?
See http://www.gmayor.com/automatic_numbering_documents.htm and
http://www.gmayor.com/Numbered_labels.htm for some techniques.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



grandpappajim wrote:
I want to print a batch of three part NCR invoices. how do I get the
serial numbers to enter automaticaly?



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
grandpappajim grandpappajim is offline
external usenet poster
 
Posts: 3
Default serial numbering

I intend to print the three parts seperately Graham.

"Graham Mayor" wrote:

Are you printing the three parts separately, or are you using an impact
printer to print all three together?
See http://www.gmayor.com/automatic_numbering_documents.htm and
http://www.gmayor.com/Numbered_labels.htm for some techniques.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



grandpappajim wrote:
I want to print a batch of three part NCR invoices. how do I get the
serial numbers to enter automaticaly?




  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default serial numbering

OK, a variation on the code on the first link will do that. Put a bookmark
at the place in your document where you want the invoice number to be
printed and run the following macro:

Sub AddNoFromINIFileToBookmark()
Dim SettingsFile As String
Dim Order As String
Dim iCount As String
Dim rInvNo As Range
Dim i As Long

iCount = InputBox("Print how many copies?", _
"Print Copies", 3)
If iCount = "" Then Exit Sub

SettingsFile = Options.DefaultFilePath(wdStartupPath) _
& "\Settings.ini"
Order = System.PrivateProfileString(SettingsFile, _
"InvoiceNumber", "Order")
If Order = "" Then
Order = 1
End If
For i = 1 To iCount
Set rInvNo = ActiveDocument.Bookmarks("InvNo").Range
rInvNo.Text = Format(Order, "00000")
With ActiveDocument
.Bookmarks.Add "InvNo", rInvNo
.Fields.Update
.ActiveWindow.View.ShowFieldCodes = False
.PrintOut
End With
Next
Order = Order + 1
System.PrivateProfileString(SettingsFile, "InvoiceNumber", _
"Order") = Order
End Sub


If you don't want the macro to prompt for the number of copies then replace

iCount = InputBox("Print how many copies?", _
"Print Copies", 3)
If iCount = "" Then Exit Sub

with

iCount = 3

The next macro will allow you to reset the invoice number to the next number
of choice.

Sub ResetInvoiceNo()
Dim SettingsFile As String
Dim Order As String
Dim sQuery As String
SettingsFile = Options.DefaultFilePath(wdStartupPath) & "\Settings.ini"

Order = System.PrivateProfileString(SettingsFile, _
"InvoiceNumber", "Order")
sQuery = InputBox("Reset invoice start number?", "Reset", Order)
If sQuery = "" Then Exit Sub
Order = sQuery
System.PrivateProfileString(SettingsFile, "InvoiceNumber", _
"Order") = Order
End Sub

http://www.gmayor.com/installing_macro.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org





grandpappajim wrote:
I intend to print the three parts seperately Graham.

"Graham Mayor" wrote:

Are you printing the three parts separately, or are you using an
impact printer to print all three together?
See http://www.gmayor.com/automatic_numbering_documents.htm and
http://www.gmayor.com/Numbered_labels.htm for some techniques.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



grandpappajim wrote:
I want to print a batch of three part NCR invoices. how do I get the
serial numbers to enter automaticaly?



  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default serial numbering

Just to clarify - you put a bookmark named "InvNo" at the place where you
want the number to appear. The next available number is stored in the
settings file. The reset function is only to set either the start number or
to correct the count after making a cock-up!

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Graham Mayor wrote:
OK, a variation on the code on the first link will do that. Put a
bookmark at the place in your document where you want the invoice
number to be printed and run the following macro:

Sub AddNoFromINIFileToBookmark()
Dim SettingsFile As String
Dim Order As String
Dim iCount As String
Dim rInvNo As Range
Dim i As Long

iCount = InputBox("Print how many copies?", _
"Print Copies", 3)
If iCount = "" Then Exit Sub

SettingsFile = Options.DefaultFilePath(wdStartupPath) _
& "\Settings.ini"
Order = System.PrivateProfileString(SettingsFile, _
"InvoiceNumber", "Order")
If Order = "" Then
Order = 1
End If
For i = 1 To iCount
Set rInvNo = ActiveDocument.Bookmarks("InvNo").Range
rInvNo.Text = Format(Order, "00000")
With ActiveDocument
.Bookmarks.Add "InvNo", rInvNo
.Fields.Update
.ActiveWindow.View.ShowFieldCodes = False
.PrintOut
End With
Next
Order = Order + 1
System.PrivateProfileString(SettingsFile, "InvoiceNumber", _
"Order") = Order
End Sub


If you don't want the macro to prompt for the number of copies then
replace
iCount = InputBox("Print how many copies?", _
"Print Copies", 3)
If iCount = "" Then Exit Sub

with

iCount = 3

The next macro will allow you to reset the invoice number to the next
number of choice.

Sub ResetInvoiceNo()
Dim SettingsFile As String
Dim Order As String
Dim sQuery As String
SettingsFile = Options.DefaultFilePath(wdStartupPath) &
"\Settings.ini"
Order = System.PrivateProfileString(SettingsFile, _
"InvoiceNumber", "Order")
sQuery = InputBox("Reset invoice start number?", "Reset", Order)
If sQuery = "" Then Exit Sub
Order = sQuery
System.PrivateProfileString(SettingsFile, "InvoiceNumber", _
"Order") = Order
End Sub

http://www.gmayor.com/installing_macro.htm


grandpappajim wrote:
I intend to print the three parts seperately Graham.

"Graham Mayor" wrote:

Are you printing the three parts separately, or are you using an
impact printer to print all three together?
See http://www.gmayor.com/automatic_numbering_documents.htm and
http://www.gmayor.com/Numbered_labels.htm for some techniques.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



grandpappajim wrote:
I want to print a batch of three part NCR invoices. how do I get
the serial numbers to enter automaticaly?





  #6   Report Post  
Posted to microsoft.public.word.docmanagement
grandpappajim grandpappajim is offline
external usenet poster
 
Posts: 3
Default serial numbering

Thanks a lot Graham, I haven't had much exsperience with Macros so this is
going to be a bit of a learning curve.....Scary
Regards Jim

"Graham Mayor" wrote:

Just to clarify - you put a bookmark named "InvNo" at the place where you
want the number to appear. The next available number is stored in the
settings file. The reset function is only to set either the start number or
to correct the count after making a cock-up!

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Graham Mayor wrote:
OK, a variation on the code on the first link will do that. Put a
bookmark at the place in your document where you want the invoice
number to be printed and run the following macro:

Sub AddNoFromINIFileToBookmark()
Dim SettingsFile As String
Dim Order As String
Dim iCount As String
Dim rInvNo As Range
Dim i As Long

iCount = InputBox("Print how many copies?", _
"Print Copies", 3)
If iCount = "" Then Exit Sub

SettingsFile = Options.DefaultFilePath(wdStartupPath) _
& "\Settings.ini"
Order = System.PrivateProfileString(SettingsFile, _
"InvoiceNumber", "Order")
If Order = "" Then
Order = 1
End If
For i = 1 To iCount
Set rInvNo = ActiveDocument.Bookmarks("InvNo").Range
rInvNo.Text = Format(Order, "00000")
With ActiveDocument
.Bookmarks.Add "InvNo", rInvNo
.Fields.Update
.ActiveWindow.View.ShowFieldCodes = False
.PrintOut
End With
Next
Order = Order + 1
System.PrivateProfileString(SettingsFile, "InvoiceNumber", _
"Order") = Order
End Sub


If you don't want the macro to prompt for the number of copies then
replace
iCount = InputBox("Print how many copies?", _
"Print Copies", 3)
If iCount = "" Then Exit Sub

with

iCount = 3

The next macro will allow you to reset the invoice number to the next
number of choice.

Sub ResetInvoiceNo()
Dim SettingsFile As String
Dim Order As String
Dim sQuery As String
SettingsFile = Options.DefaultFilePath(wdStartupPath) &
"\Settings.ini"
Order = System.PrivateProfileString(SettingsFile, _
"InvoiceNumber", "Order")
sQuery = InputBox("Reset invoice start number?", "Reset", Order)
If sQuery = "" Then Exit Sub
Order = sQuery
System.PrivateProfileString(SettingsFile, "InvoiceNumber", _
"Order") = Order
End Sub

http://www.gmayor.com/installing_macro.htm


grandpappajim wrote:
I intend to print the three parts seperately Graham.

"Graham Mayor" wrote:

Are you printing the three parts separately, or are you using an
impact printer to print all three together?
See http://www.gmayor.com/automatic_numbering_documents.htm and
http://www.gmayor.com/Numbered_labels.htm for some techniques.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



grandpappajim wrote:
I want to print a batch of three part NCR invoices. how do I get
the serial numbers to enter automaticaly?




  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default serial numbering

http://www.gmayor.com/installing_macro.htm explains what to do with the
code.
Add the macro and a button to a custom toolbar to call it, to the invoice
template. Click the button and it will print three similarly numbered copies
then increment the stored number.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



grandpappajim wrote:
Thanks a lot Graham, I haven't had much exsperience with Macros so
this is going to be a bit of a learning curve.....Scary
Regards Jim

"Graham Mayor" wrote:

Just to clarify - you put a bookmark named "InvNo" at the place
where you want the number to appear. The next available number is
stored in the settings file. The reset function is only to set
either the start number or to correct the count after making a
cock-up!

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Graham Mayor wrote:
OK, a variation on the code on the first link will do that. Put a
bookmark at the place in your document where you want the invoice
number to be printed and run the following macro:

Sub AddNoFromINIFileToBookmark()
Dim SettingsFile As String
Dim Order As String
Dim iCount As String
Dim rInvNo As Range
Dim i As Long

iCount = InputBox("Print how many copies?", _
"Print Copies", 3)
If iCount = "" Then Exit Sub

SettingsFile = Options.DefaultFilePath(wdStartupPath) _
& "\Settings.ini"
Order = System.PrivateProfileString(SettingsFile, _
"InvoiceNumber", "Order")
If Order = "" Then
Order = 1
End If
For i = 1 To iCount
Set rInvNo = ActiveDocument.Bookmarks("InvNo").Range
rInvNo.Text = Format(Order, "00000")
With ActiveDocument
.Bookmarks.Add "InvNo", rInvNo
.Fields.Update
.ActiveWindow.View.ShowFieldCodes = False
.PrintOut
End With
Next
Order = Order + 1
System.PrivateProfileString(SettingsFile, "InvoiceNumber", _
"Order") = Order
End Sub


If you don't want the macro to prompt for the number of copies then
replace
iCount = InputBox("Print how many copies?", _
"Print Copies", 3)
If iCount = "" Then Exit Sub

with

iCount = 3

The next macro will allow you to reset the invoice number to the
next number of choice.

Sub ResetInvoiceNo()
Dim SettingsFile As String
Dim Order As String
Dim sQuery As String
SettingsFile = Options.DefaultFilePath(wdStartupPath) &
"\Settings.ini"
Order = System.PrivateProfileString(SettingsFile, _
"InvoiceNumber", "Order")
sQuery = InputBox("Reset invoice start number?", "Reset", Order)
If sQuery = "" Then Exit Sub
Order = sQuery
System.PrivateProfileString(SettingsFile, "InvoiceNumber", _
"Order") = Order
End Sub

http://www.gmayor.com/installing_macro.htm


grandpappajim wrote:
I intend to print the three parts seperately Graham.

"Graham Mayor" wrote:

Are you printing the three parts separately, or are you using an
impact printer to print all three together?
See http://www.gmayor.com/automatic_numbering_documents.htm and
http://www.gmayor.com/Numbered_labels.htm for some techniques.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



grandpappajim wrote:
I want to print a batch of three part NCR invoices. how do I get
the serial numbers to enter automaticaly?



  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default serial numbering

Note that the incremented number is only good for the PC that the template
is used on. If you move this function between (say) PC and laptop, you will
need to make use of the reset macro to ensure that the next invoice number
is correct for the changed PC.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Graham Mayor wrote:
http://www.gmayor.com/installing_macro.htm explains what to do with
the code.
Add the macro and a button to a custom toolbar to call it, to the
invoice template. Click the button and it will print three similarly
numbered copies then increment the stored number.


grandpappajim wrote:
Thanks a lot Graham, I haven't had much exsperience with Macros so
this is going to be a bit of a learning curve.....Scary
Regards Jim

"Graham Mayor" wrote:

Just to clarify - you put a bookmark named "InvNo" at the place
where you want the number to appear. The next available number is
stored in the settings file. The reset function is only to set
either the start number or to correct the count after making a
cock-up!

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Graham Mayor wrote:
OK, a variation on the code on the first link will do that. Put a
bookmark at the place in your document where you want the invoice
number to be printed and run the following macro:

Sub AddNoFromINIFileToBookmark()
Dim SettingsFile As String
Dim Order As String
Dim iCount As String
Dim rInvNo As Range
Dim i As Long

iCount = InputBox("Print how many copies?", _
"Print Copies", 3)
If iCount = "" Then Exit Sub

SettingsFile = Options.DefaultFilePath(wdStartupPath) _
& "\Settings.ini"
Order = System.PrivateProfileString(SettingsFile, _
"InvoiceNumber", "Order")
If Order = "" Then
Order = 1
End If
For i = 1 To iCount
Set rInvNo = ActiveDocument.Bookmarks("InvNo").Range
rInvNo.Text = Format(Order, "00000")
With ActiveDocument
.Bookmarks.Add "InvNo", rInvNo
.Fields.Update
.ActiveWindow.View.ShowFieldCodes = False
.PrintOut
End With
Next
Order = Order + 1
System.PrivateProfileString(SettingsFile, "InvoiceNumber", _
"Order") = Order
End Sub


If you don't want the macro to prompt for the number of copies then
replace
iCount = InputBox("Print how many copies?", _
"Print Copies", 3)
If iCount = "" Then Exit Sub

with

iCount = 3

The next macro will allow you to reset the invoice number to the
next number of choice.

Sub ResetInvoiceNo()
Dim SettingsFile As String
Dim Order As String
Dim sQuery As String
SettingsFile = Options.DefaultFilePath(wdStartupPath) &
"\Settings.ini"
Order = System.PrivateProfileString(SettingsFile, _
"InvoiceNumber", "Order")
sQuery = InputBox("Reset invoice start number?", "Reset", Order)
If sQuery = "" Then Exit Sub
Order = sQuery
System.PrivateProfileString(SettingsFile, "InvoiceNumber", _
"Order") = Order
End Sub

http://www.gmayor.com/installing_macro.htm


grandpappajim wrote:
I intend to print the three parts seperately Graham.

"Graham Mayor" wrote:

Are you printing the three parts separately, or are you using an
impact printer to print all three together?
See http://www.gmayor.com/automatic_numbering_documents.htm and
http://www.gmayor.com/Numbered_labels.htm for some techniques.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



grandpappajim wrote:
I want to print a batch of three part NCR invoices. how do I get
the serial numbers to enter automaticaly?



Reply
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
Serial letter: print as PDF Karsten Wutzke Microsoft Word Help 1 December 14th 07 09:27 PM
Serial Number Derek Da Silva Microsoft Word Help 1 October 4th 07 08:10 PM
Serial Number rd Microsoft Word Help 3 June 6th 06 07:41 PM
serial numbering documents print62 Page Layout 2 January 13th 05 12:47 AM
serial numbering documents print62 Microsoft Word Help 1 January 12th 05 02:10 PM


All times are GMT +1. The time now is 03:22 PM.

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

About Us

"It's about Microsoft Word"