![]() |
#1
|
|||
|
|||
![]() Hi, my first post. Hope you can help. Using Word 2003 to try to make a template[s] with sequential numbering using a macro created by Graham Mayor. I have followed the instruction but don't achieve the final numbering. I'm confused by 2 things in the instructions. 1 When in the macro editor, the macro name is there and I'm told to paste the macro code OVER it. What does this mean? Where exactly do I paste the code? 2 When I go to another instruction, file> properties > custom and insert the InvNum words, I need a value to be able to save it. What do I put as a value. If I can do these 2 things I should be able to get this template working, I hope. Best regards, grstools. ![]() |
#2
|
||||
|
||||
![]()
If you have a macro that is already "named," that is, the code lines include Sub and End Sub, you only have to copy the whole code block into the Visual Basic Editor.
For more specific assistance, tell us which code you are using.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#3
|
|||
|
|||
![]()
Hi Stefan, I go to macro and insert the name AutoNew and create. Then in vb editor it shows as:
Sub AutoNew () ' ' AutoNew Macro ' End Sub Now as per instructions, I highlight AutoNew and paste the code over it. This then shows in yellow: SubSub AutoNew (), then at the bottom there are 2 End Sub one is greyed. I'm obviously pasting it wrongly. Thanks.Graeme. |
#4
|
||||
|
||||
![]()
If you see two "End Sub" (one immediately after the other), delete one of them.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
#5
|
|||
|
|||
![]()
Hi Stefan, I can delete the End Sub ok. Pasting is the problem. I highlight AutoNew () as the macro name and then get SubSub AutoNew () in red. Do I have to delete one of these Sub things also? Graeme.
|
#6
|
||||
|
||||
![]()
Yes, replace "SubSub" with "Sub" only.
Note that if you are letting Word create a "blank" macro, it adds "Sub <NameOfMacro>" and "End Sub" for you, and when you paste code that already includes these commands, you get duplicates.
__________________
Stefan Blom Microsoft Word MVP Microsoft 365 apps for business Windows 11 Professional |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
gburya | Word VBA | 26 | 07-04-2017 03:29 PM |
![]() |
RetailPoint | Word VBA | 14 | 01-14-2015 09:51 AM |
![]() |
Geza59 | Word VBA | 18 | 01-15-2014 01:43 AM |
![]() |
GeneOliver | PowerPoint | 1 | 10-01-2012 11:26 PM |
![]() |
jdwoods | Word VBA | 7 | 12-16-2011 05:11 AM |