Saturday, July 23, 2011

How to Increment a Counter in Word


Sequential Label Numbers
1. Visit the gmayor.com website, and then download and save the 'Numbered_Labels' add-on to your computer.
2. Click the Windows orb, then 'Computer.' Open the folder of the 'Numbered_Labels.zip' file. Right-click the 'Numbered_Labels.zip' file, and then click 'Extract Here.' Windows decompresses the file and creates two new files: 'Sequential Numbered Label Maker (Word 2003 -- ver6).exe' and 'Sequential Numbered Label Maker (Word 2007-10 -- ver6).exe.'
3. Close Word if the program is active. Double-click the add-on installation file for the Word version installed on your computer. Click 'Accept' for the 'User Information and License' agreement. Follow the remaining prompts to install the add-on in Word.
4. Launch Microsoft Word. Click the 'Mailings' tab, then 'Numbered Labels.' After the 'Sequentially Numbered Labels' window appears, click 'Set Text & Options.'
5. Click the address and formatting options you want to appear on the labels. Click the database file or Word merge database containing names and address to use for the labels, and then click 'OK.' Alternatively, click the 'Envelopes' tab in the 'Sequentially Numbered Labels' window to set up options for printing directly to envelopes, if your printer supports the option.
6. Click and enable the 'Add sequential numbers' option. Enter the start number in the 'Start #' field. Enter the number by which to increment each label or envelope number in the 'Increment Numbers by' field.
7. Click 'Create Labels.' Word creates labels on the screen with sequential numbers. Insert label paper in your printer. Click 'File,' then 'Print' to print the labels on the printer.
Sequential Numbers in File Names
8. Launch Word. Click 'File,' then 'Options.' Click 'Customize Ribbon.'
9. Click and enable the 'Developer' option on the right side of the window, and then click 'OK.' The 'Developer' tab appears on the Microsoft Word ribbon bar.
10. Click the 'Developer' tab, then the 'Visual Basic' button. Right-click the 'ThisDocument' link in the 'Project' pane, and then click 'Insert,' 'Module.'
11. Copy and paste the following code into the new window:Sub AutoNew()FormNumber = System.PrivateProfileString('C:\Settings.Txt', _'MacroSettings', 'Order')If FormNumber = '' ThenFormNumber = 1ElseFormNumber = FormNumber + 1End IfSystem.PrivateProfileString('C:\Settings.txt', 'MacroSettings', _'FormNumber') = FormNumberActiveDocument.Bookmarks('FormNumber').Range.InsertBefore Format(FormNumber, '00#')ActiveDocument.SaveAs FileName:='path' & Format(FormNumber, '00#')End Sub
12. Change the 'FormNumber' variable to the save name you want to use for documents. For example, if you want to save order forms with sequential numbers, such as 'orderform1,' 'orderform2' and onward, change the 'FormNumber' variable to 'orderform.'
13. Click the 'Save' icon in the Visual Basic editor. Close the Visual Basic window.
14. Enter text for the form or document as needed. Click 'Insert,' 'Quick Parts,' then 'Fields' to enter data such as customer or recipient information.
15. Click 'File,' then 'Save As.' Click 'Word Macro-Enabled Template' in the 'Save as Type' drop-down list. Enter a name for the new template file, and then click 'Save.' Close the template document in Word.
16. Click 'File,' 'New,' then 'My Templates.' Click the name of the template you created, and then click 'OK.' A new template document opens and Word automatically saves it with next sequential number in the file name.
 

Blogger news

Pageviews past week

About