Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Word VBA

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 10-26-2014, 05:45 PM
10nry 10nry is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Oct 2014
Posts: 2
10nry is on a distinguished road
Default Looking for a way to autofill a number in a label.

Every day I make labels for various parts we test. At the end of the label there is a serial number in this format XXXXXX-XX-XX. The last two digits are a number that is sequential up to the number of parts there are. The other bay I had to make labels for 500 of the same part and had to manually go to those digits in each label and type in 01 to 500.



Is there a way to say a range of numbers I need and have Word put them in for me?

Thank you for your time.
Reply With Quote
  #2  
Old 10-26-2014, 07:29 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 17,355
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

You say the number format is XXXXXX-XX-XX, but then you say "The last two digits are a number that is sequential " and you need "to manually go to those digits in each label and type in 01 to 500". Given you're updating only two digits, that seems to limit you to 100 numbers at most, from 00 to 99, inclusive. What happens with #s 100+?
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #3  
Old 10-26-2014, 10:31 PM
gmayor's Avatar
gmayor gmayor is offline Windows 7 64bit Office 2010 32bit
Expert
 
Join Date: Aug 2014
Posts: 2,355
gmayor is a jewel in the roughgmayor is a jewel in the roughgmayor is a jewel in the roughgmayor is a jewel in the rough
Default

You could consider http://www.gmayor.com/Numbered_labels.htm. You can set the format of the number and combine it with fixed text.
__________________
Graham Mayor - MS MVP (Word)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #4  
Old 10-27-2014, 04:20 PM
10nry 10nry is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Oct 2014
Posts: 2
10nry is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
You say the number format is XXXXXX-XX-XX, but then you say "The last two digits are a number that is sequential " and you need "to manually go to those digits in each label and type in 01 to 500". Given you're updating only two digits, that seems to limit you to 100 numbers at most, from 00 to 99, inclusive. What happens with #s 100+?
I was not very clear, I apologize. The number could be infinite I suppose although I have never gone over 500 before.
Reply With Quote
  #5  
Old 10-27-2014, 04:46 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 17,355
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

You still haven't said what happens to the 2-digit #. For example, does it expand to 3 digits or does the preceding # in the string get incremented?
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
Reply

Tags
numbering and formatting

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to have two formats in the Caption style: Label number - text? Jamal NUMAN Word 39 03-14-2017 06:32 PM
How to start a label mail merge at a specific label? DHKaplan Mail Merge 2 04-17-2014 07:33 PM
Userform label bordercolor not controllable if click label skarden Word VBA 1 09-29-2013 07:27 PM
Autofill Address dazwm Outlook 13 08-21-2013 09:28 AM
Autofill Automation Parkiee1981 Excel 4 03-15-2013 01:24 PM


All times are GMT -7. The time now is 10:10 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft