Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-17-2011, 04:52 PM
gburya gburya is offline How do I do a Sequential Numbering? Windows 7 How do I do a Sequential Numbering? Office 2010 (Version 14.0)
Novice
How do I do a Sequential Numbering?
 
Join Date: Oct 2010
Location: Spokane, Washington
Posts: 9
gburya is on a distinguished road
Question How do I do a Sequential Numbering?

I am creating some certificates. they are much like Stock certificates, and they need to be individually numbered. I'm sure there is a way to get a Field of some sort that does this.



How do I do this please?

I just want to put it into a text box and have it automatically number each one as I print them out.

Say I tell it to print 12 pages of the same 1 page document, then I need each one to have a progressively larger number. Increasing by 1 digit each time.

Oh yes I am using Office 2010 word to do this in.
Reply With Quote
  #2  
Old 01-18-2011, 04:56 PM
macropod's Avatar
macropod macropod is offline How do I do a Sequential Numbering? Windows 7 32bit How do I do a Sequential Numbering? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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 gburya,

As I undestand it, you want to be able to print 'x' pages and have the printout increment the count from a nominated starting number. Correct? In that case, you'll need a macro.

Try the following macro:
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))
If iStart = 0 Or iStart > iEnd Then Exit Sub
With ActiveDocument
  For i = iStart To iEnd
    With .Shapes(1).TextFrame.TextRange.Fields(1)
      StrArry = Split(.Code.Text, " ")
      .Code.Text = Replace(.Code.Text, StrArry(UBound(StrArry)), i)
      .Update
    End With
    .PrintOut
  Next
End With
ErrHandler:
End Sub
To see how to install the macro, go to: http://www.gmayor.com/installing_macro.htm
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]

Last edited by macropod; 01-18-2011 at 06:00 PM.
Reply With Quote
  #3  
Old 01-18-2011, 06:02 PM
gburya gburya is offline How do I do a Sequential Numbering? Windows 7 How do I do a Sequential Numbering? Office 2010 (Version 14.0)
Novice
How do I do a Sequential Numbering?
 
Join Date: Oct 2010
Location: Spokane, Washington
Posts: 9
gburya is on a distinguished road
Default Answers

Ok, I am going to send you a copy of the document so you have it to see what I am doing... however the answers to your questions are:

1. Yes it is a standard word text box. Or I could do it without a text box, just put it in the standard word format without it being in a text box. I just prefer to use the text box.
2. Yes I want it to be able to print 'x' pages and have the printout increment the count from a nominated starting number.
3. I just uploaded a copy of the file and it's name is: Capital_Unit_Certificate.docx
Reply With Quote
  #4  
Old 01-18-2011, 07:24 PM
gburya gburya is offline How do I do a Sequential Numbering? Windows 7 How do I do a Sequential Numbering? Office 2010 (Version 14.0)
Novice
How do I do a Sequential Numbering?
 
Join Date: Oct 2010
Location: Spokane, Washington
Posts: 9
gburya is on a distinguished road
Default

Hrmm in trying to do the upload I got this message:
Your submission could not be processed because a security token was missing.
Reply With Quote
  #5  
Old 01-18-2011, 07:42 PM
macropod's Avatar
macropod macropod is offline How do I do a Sequential Numbering? Windows 7 32bit How do I do a Sequential Numbering? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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 gburya,

I have no idea what that message means.

After adding the macro to the VBE, you can exit that and run the macro by pressing Alt-F8 and selecting 'CertificatePrint'.

A couple of points to note:
1. I've assumed the SEQ field is the first field in the first textbox in the document. If it's not, you'll need to adjust the index numbers accordingly.
2. In Word 2007 & later, if you put the macro into your 'Capital_Unit_Certificate' document, you'll need to save the document in the docm format and you'll need to enable macros whenever you open the document if you want to print the certificate. Alternatively, if you add the macro to Word's 'Normal' template, the macro will always be available (to you only) an you can keep the document in it's docx format - plus you won't get macro warnings every time you open it.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 01-20-2011, 10:39 AM
gburya gburya is offline How do I do a Sequential Numbering? Windows 7 How do I do a Sequential Numbering? Office 2010 (Version 14.0)
Novice
How do I do a Sequential Numbering?
 
Join Date: Oct 2010
Location: Spokane, Washington
Posts: 9
gburya is on a distinguished road
Default

Hey I feel so stupid!!

I have tried everything I can think of to get this macro to work, but just can't get it to do what I need. I tried putting it on just a blank document. It is not showing the number at all, and not printing anything either.

I guess I am not placing it in the document properly???

Not sure what is happening...

Any assistance is helpful.

OH just thought of this... my computer is a 64-bit so could that be making any difference? I have everything program wise set for 64-bit...

Thanks!!

Last edited by gburya; 01-20-2011 at 12:57 PM.
Reply With Quote
  #7  
Old 01-20-2011, 01:49 PM
macropod's Avatar
macropod macropod is offline How do I do a Sequential Numbering? Windows 7 32bit How do I do a Sequential Numbering? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

Try the attached. The code's a bit different to what I posted before, but that doesn't affect its validity - the update simply 'remembers' what the last certificate printed was for the next time you want to do a print.

Regarding running everything in 64-bit mode, Microsoft recommends not doing that with Office unless you need it for Excel. I don't know why that is - maybe they're not confident yet that everything else will work smoothly. Even so, I don't imaging there's anything about 64-bit mode that would affect the macro.
Attached Files
File Type: zip Certificate Demo.zip (19.4 KB, 336 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 01-20-2011, 02:19 PM
gburya gburya is offline How do I do a Sequential Numbering? Windows 7 How do I do a Sequential Numbering? Office 2010 (Version 14.0)
Novice
How do I do a Sequential Numbering?
 
Join Date: Oct 2010
Location: Spokane, Washington
Posts: 9
gburya is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
Hi Grant,

Try the attached. The code's a bit different to what I posted before, but that doesn't affect its validity - the update simply 'remembers' what the last certificate printed was for the next time you want to do a print.

Regarding running everything in 64-bit mode, Microsoft recommends not doing that with Office unless you need it for Excel. I don't know why that is - maybe they're not confident yet that everything else will work smoothly. Even so, I don't imaging there's anything about 64-bit mode that would affect the macro.

- - - - - - - - - -

I feel like such a pain in the #$%&*().... I took your example, opened it and didn't change a thing, didn't try to copy anything etc... all I did was open it in word, then tell it to print 2 copies of it. When I did that both copies came up with it saying: "Certificate 1" it did NOT increase the number on each print!!

This is getting to be a pain in the buttt to get done!!!
Reply With Quote
  #9  
Old 01-20-2011, 02:36 PM
macropod's Avatar
macropod macropod is offline How do I do a Sequential Numbering? Windows 7 32bit How do I do a Sequential Numbering? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

I'll bet you didn't run the macro - remember how I told you before:
Quote:
you can run the macro by pressing Alt-F8 and selecting 'CertificatePrint'
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 01-24-2011, 04:28 PM
gburya gburya is offline How do I do a Sequential Numbering? Windows 7 How do I do a Sequential Numbering? Office 2010 (Version 14.0)
Novice
How do I do a Sequential Numbering?
 
Join Date: Oct 2010
Location: Spokane, Washington
Posts: 9
gburya is on a distinguished road
Default

Whoo-Hoo!! This works in YOUR document, but I can't get it to work in MY document! How do I insert a Macro on the page "Right where I want it"? I can use a box or I can use normal text and insert it at that point. But I just can't get it to transfer or copy to my document and work.

And finally, is it possible to have the macro not only ask what number to start and end with but also to ask which printer I want to use to do the printing on? Of course it would get that list from all the printers associated with the computer this is being done on.

I have 2 printers myself, but I plan to have this printed at the local "Office Depot Store" they have like 5 or 6 printers associated with each of their computers in their print center. So when I take it to them they would need to be able to choose which printer we are going to use.

Never thought of the printer to use until I had the problem on my machine with only 2 printers... LOL

Oh yea, lastly... I saved the macro in the Global "Normal.dotm" file so it will always be available to ALL documents I make!

Last edited by gburya; 01-24-2011 at 04:30 PM. Reason: Forgot to say something...
Reply With Quote
  #11  
Old 01-24-2011, 05:29 PM
macropod's Avatar
macropod macropod is offline How do I do a Sequential Numbering? Windows 7 32bit How do I do a Sequential Numbering? Office 2000
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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 gburya,

You can copy the numbering field from the textbox on my document and paste it into the textbox on your document.

To transfer the macro:
1. open both documents
2. press Alt-F11, and copy the code.
3. click on 'Project(DocName), where 'DocName' is your document's name, then Insert|Module.
4. paste the copied code into the module.
5. press Alt-F11 to return to the active document.
6. Close the 'Certificate Demo' document.
Your document should now be ready to run.

Attached is an update that triggers the print dialog (after the start/end numbers have been input).
Attached Files
File Type: zip Certificate Demo.zip (20.2 KB, 363 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #12  
Old 07-07-2011, 12:00 PM
admiralpumpkin admiralpumpkin is offline How do I do a Sequential Numbering? Mac OS X How do I do a Sequential Numbering? Office for Mac 2011
Novice
 
Join Date: Jul 2011
Posts: 2
admiralpumpkin is on a distinguished road
Default

Followed all these directions for someone else (thanks macropod!) and they worked great for me.

Maybe you can help me a bit more.

I document I'm printing has the same sequential number in three places on three different pages. As I read the script we're using it only checks the first text box. Is there a way to mod it which would allow it to update all three (in my case) text boxes before the print in invoked?
Reply With Quote
  #13  
Old 07-08-2011, 02:52 AM
macropod's Avatar
macropod macropod is offline 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,962
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 AdmiralPumpkin,

What you can do is:
1. Bookmark the field in the textbox.
2. Insert cross-references to the bookmark wherever else you want the # repeated.
3. Add the line 'ActiveDocument.Fields.Update' before the line 'ActiveDocument.PrintOut'
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #14  
Old 07-08-2011, 08:57 AM
admiralpumpkin admiralpumpkin is offline How do I do a Sequential Numbering? Mac OS X How do I do a Sequential Numbering? Office for Mac 2011
Novice
 
Join Date: Jul 2011
Posts: 2
admiralpumpkin is on a distinguished road
Default

That worked well, once I figured out that to insert a bookmark you had to click on Cross-Reference, then pull down the menu to Bookmark.

Thanks!

One final request, how do I get the number format of the increasing numbers to be 001, 002, ... 010, 011, ... 099, 100, 101. In other words, to have three digits even if the first two are zeros.
Reply With Quote
  #15  
Old 07-08-2011, 05:22 PM
macropod's Avatar
macropod macropod is offline 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,962
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 AdmiralPumpkin,

You should be able to do that by changing:
.Code.Text = "=" & i & " \# 0"
to
.Code.Text = "=" & i & " \# 000"
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


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 04:26 PM.


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