Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 02-17-2012, 05:44 AM
Peter Earle Peter Earle is offline How do I do a Sequential Numbering? Windows 7 32bit How do I do a Sequential Numbering? Office 2010 32bit
Novice
 
Join Date: Feb 2012
Posts: 1
Peter Earle is on a distinguished road
Default I am having all the same problems.

Quote:
Originally Posted by macropod View Post
Try the following macro:
Code:
...
iEnd = CInt(InputBox("What is the last Certificate to print?", "Print Certificates To", iStart))
...
Is there an error?
Should it not read:
iEnd = CInt(InputBox("What is the last certificate to print?", "Print Certificates To", iEnd))



I can't seem to make it print anything at all (Not even if I change this)
Reply With Quote
  #17  
Old 02-17-2012, 06:57 PM
macropod's Avatar
macropod macropod is online now How do I do a Sequential Numbering? Windows 7 64bit How do I do a Sequential Numbering? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

The code is correct. The reason for the iStart that you queried is that the code defaults to having the starting # as the ending # also.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #18  
Old 11-14-2012, 08:15 PM
delikid delikid is offline How do I do a Sequential Numbering? Windows 7 32bit How do I do a Sequential Numbering? Office 2010 32bit
Novice
 
Join Date: Nov 2012
Posts: 1
delikid is on a distinguished road
Default

This macro and all the tips and hints worked INCREDIBLY well! THANK YOU for taking the time to write all this out and explain all the bits!
Reply With Quote
  #19  
Old 11-17-2012, 07:34 PM
JNMZ20 JNMZ20 is offline How do I do a Sequential Numbering? Windows 7 64bit How do I do a Sequential Numbering? Office XP
Novice
 
Join Date: Nov 2012
Posts: 2
JNMZ20 is on a distinguished road
Default works great but i am having an additional problem

i want to say thanks for this information it has helped a lot. I have a similar document but i was hoping to generate numbering for 2 text box location, I am hoping to have them numerical example box A would have the #1 in Box B would have #2 in and on the next copy they would have 3 & 4. if that is an option.
If there is an easier way or better way to do it i would be interested in help.
thank you for any help that you can give.
Reply With Quote
  #20  
Old 11-17-2012, 07:52 PM
macropod's Avatar
macropod macropod is online now How do I do a Sequential Numbering? Windows 7 64bit How do I do a Sequential Numbering? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #21  
Old 11-18-2012, 06:55 AM
JNMZ20 JNMZ20 is offline How do I do a Sequential Numbering? Windows 7 64bit How do I do a Sequential Numbering? Office XP
Novice
 
Join Date: Nov 2012
Posts: 2
JNMZ20 is on a distinguished road
Default

worked great thank you so much.
Reply With Quote
  #22  
Old 07-09-2014, 01:35 PM
afclark82 afclark82 is offline How do I do a Sequential Numbering? Windows 8 How do I do a Sequential Numbering? Office 2010 64bit
Novice
 
Join Date: Jul 2014
Posts: 2
afclark82 is on a distinguished road
Default

Hi All,

I got this working no problem. My issue is that there is no way to setup the printer when using this code. Is there anyway to get the answers to the sequential numbering question and then send it to the printer setup screen? This would allow us to have our printing services run the macro and then print off our materials exactly the way they want (i.e., duplex and staple).

Thanks for your help in advance.
Reply With Quote
  #23  
Old 07-09-2014, 04:45 PM
macropod's Avatar
macropod macropod is online now How do I do a Sequential Numbering? Windows 7 32bit How do I do a Sequential Numbering? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

You could, of course, do you printer setup before running the macro. Indeed, if I were to add something for the print dialogue, I'd probably insert it between:
If iStart = 0 Or iStart > iEnd Then Exit Sub
and:
With ActiveDocument
which would achieve essentially the same thing.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #24  
Old 07-09-2014, 04:55 PM
afclark82 afclark82 is offline How do I do a Sequential Numbering? Windows 8 How do I do a Sequential Numbering? Office 2010 64bit
Novice
 
Join Date: Jul 2014
Posts: 2
afclark82 is on a distinguished road
Default

Thanks for the info. Just to confirm.... There is no way to actually bring up the print dialogue box? It would in fact have to be scripted in? So, if we were to set up the printer BEFORE using the macro, it should run correctly?

Thanks again!
Reply With Quote
  #25  
Old 07-09-2014, 05:18 PM
macropod's Avatar
macropod macropod is online now How do I do a Sequential Numbering? Windows 7 32bit How do I do a Sequential Numbering? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Yes and Yes.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #26  
Old 07-03-2017, 11:51 PM
paulj1x paulj1x is offline How do I do a Sequential Numbering? Windows 10 How do I do a Sequential Numbering? Office 2013
Novice
 
Join Date: Jul 2017
Posts: 1
paulj1x is on a distinguished road
Default

If you have a single document it seems like this should be able to be done without macros?

I have one text box with a field {SEQ SerialNumber \r 10000001 \* MERGEFORMAT}
This field has been bookmarked SeqNumBookmark.

I have a second text box with a field {SEQ SerialNumber SeqNumBookmark \n \* MERGEFORMAT}

I've tried lots of different things but the second text box always has the same sequence number as the first: 10000001

Also, is there a way to print leading zeroes? I saw how it was done with the macro but not sure how to do it with a field.
Reply With Quote
  #27  
Old 07-04-2017, 03:29 PM
macropod's Avatar
macropod macropod is online now How do I do a Sequential Numbering? Windows 7 64bit How do I do a Sequential Numbering? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by paulj1x View Post
If you have a single document it seems like this should be able to be done without macros?
If you read the discussion, you'll see the requirement is to automate the process of producing multiple sequential printouts, not just one.
Quote:
Originally Posted by paulj1x View Post
Also, is there a way to print leading zeroes? I saw how it was done with the macro but not sure how to do it with a field.
That's a simple matter of applying a numeric picture switch to the field.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I do a Sequential Numbering? Sequential Page Numbering of Multiple Word Docs bobmard Word 8 08-24-2011 08:51 AM
How do I do a Sequential Numbering? Numbering ? MaryLee Word 1 11-29-2010 12:06 PM
Numbering Problem ydbret Word 0 08-05-2010 12:38 PM
How do I do a Sequential Numbering? 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

Other Forums: Access Forums

All times are GMT -7. The time now is 06:37 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft