If you use an envelope template (you can download one from my web site) to
create the envelope, add a bookmark "RecNo" where you want the number to
appear and run the following macro. The second macro allows you to simply
reset the start number.
http://www.gmayor.com/installing_macro.htm
Sub AddNoFromINIFileToEnvelope()
Dim SettingsFile As String
Dim Envelope As String
Dim iCount As String
Dim rRecNo As Range
Dim i As Long
iCount = InputBox("Print how many envelopes?", _
"Print Envelopes", 1)
If iCount = "" Then Exit Sub
SettingsFile = Options.DefaultFilePath(wdStartupPath) & "\Settings.ini"
Order = System.PrivateProfileString(SettingsFile, _
"EnvelopeNumber", "Envelope")
If Envelope = "" Then
Envelope = 1
End If
For i = 1 To iCount
Set rRecNo = ActiveDocument.Bookmarks("RecNo").Range
rRecNo.Text = format(Envelope, "000")
With ActiveDocument
.Bookmarks.Add "RecNo", rRecNo
.Fields.Update
.ActiveWindow.View.ShowFieldCodes = False
.PrintOut
End With
Envelope = Envelope + 1
Next
System.PrivateProfileString(SettingsFile, "EnvelopeNumber", _
"Envelope") = Envelope
End Sub
Sub ResetNo()
Dim SettingsFile As String
Dim Order As String
Dim sQuery As String
SettingsFile = Options.DefaultFilePath(wdStartupPath) & "\Settings.ini"
Envelope = System.PrivateProfileString(SettingsFile, _
"EnvelopeNumber", "Envelope")
sQuery = InputBox("Reset start number?", "Reset", Envelope)
If sQuery = "" Then Exit Sub
Envelope = sQuery
System.PrivateProfileString(SettingsFile, "EnvelopeNumber", _
"Envelope") = Envelope
End Sub
If the envelopes are to go to different people create an envelope merge
document
http://www.gmayor.com/mail_merge_labels_with_word_xp.htm or
http://www.gmayor.com/merge_labels_with_word_2007.htm and add a MergeSeq
field to provide the numbering.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>