![]() |
|
#20
|
||||
|
||||
|
Hi JNMZ20,
Aside from making a copy of the textbox for the second number, a few code changes would be needed: Code:
Sub CertificatePrint()
Dim iStart As Integer, iEnd As Integer, i As Integer, StrArry
On Error GoTo ErrHandler
iStart = CInt(InputBox("What is the first Certificate to print?", "Print Certificates From", "1"))
iEnd = CInt(InputBox("What is the last Certificate to print?", "Print Certificates To", iStart + 1))
If iStart = 0 Or iStart > iEnd Then Exit Sub
With ActiveDocument
For i = iStart To iEnd Step 2
With .Shapes(1).TextFrame.TextRange.Fields(1)
StrArry = Split(.Code.Text, " ")
.Code.Text = Replace(.Code.Text, StrArry(UBound(StrArry)), i)
.Update
End With
With .Shapes(2).TextFrame.TextRange.Fields(1)
StrArry = Split(.Code.Text, " ")
.Code.Text = Replace(.Code.Text, StrArry(UBound(StrArry)), i + 1)
.Update
End With
.PrintOut
Next
End With
ErrHandler:
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Sequential Page Numbering of Multiple Word Docs
|
bobmard | Word | 8 | 08-24-2011 08:51 AM |
Numbering ?
|
MaryLee | Word | 1 | 11-29-2010 12:06 PM |
| Numbering Problem | ydbret | Word | 0 | 08-05-2010 12:38 PM |
Subtotaling Sequential 0's
|
ktpalmer | Excel | 2 | 06-23-2010 06:54 AM |
| numbering and formatting | whitemelly | Word | 0 | 02-11-2010 09:06 AM |