![]() |
|
#1
|
||||
|
||||
![]()
Hi Claire,
See attached template. To use it, you should be able to just double-click on it to create a new document. The macros are in the template's 'ThisDocument' module. I've changed the name of the 'AutoNew' macro to 'Document_New) to reflect this, but that's all. If you open the vbe and click onthe template's 'ThisDocument' module, you'll be able to see the code. Likewise, if you click on 'Advanced properties' for either the template or the document and look under 'Custom', you'll see the 'InvNum' property.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#2
|
|||
|
|||
![]()
Thanks so much for this! I've given it a try but haven't had any luck. Could be something that I'm doing (or not doing). This is what I've tried so far...
When I double click on it from my desktop, it opens and shows the field #0000. I opened the template again and the number hadn't increased. I wondered if I needed to save the document for the macro to work, but it still didn't work. Also I've tried 'running' the macro from the macro commands. So I thought that maybe the template needed to be in the My Templates folder and moved it there. I opened a new document from template, and went through the same steps as above, but with no success. In fact when I tried to run the macro from this location, I got the following error... Run-time error '-2147483640 (80000008)' Method 'PrivateProfileString' of object 'System' failed Next I wondered if it was either something to do with a setting on my computer, or that I'm using a mac. So I tried the template from our PC (from the desktop though). This hasn't worked either. What am I doing wrong? |
#3
|
||||
|
||||
![]()
Hi Claire,
It's probably something to do with differences betwen PCs and Macs limiting how the code can save the numbering file used by the template. I'll look into some other options and get back to you. I don't use or have access to a Mac, so it might take a day or three.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#4
|
|||
|
|||
![]()
I failed to notice that on the PC Word, was saying that macros were disabled. So once I turned them on, the template works, so it's definitely a Mac thing.
Yay! Progress ![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Add a serial number to an invoice | pringle747 | Excel Programming | 6 | 02-19-2015 11:19 AM |
![]() |
acki | Excel | 7 | 08-14-2013 08:11 PM |
Invoice Statement | Shoshana3 | Word | 0 | 11-15-2010 03:02 PM |
![]() |
mrphilk | Excel | 2 | 06-08-2010 12:39 PM |
Read-Only and Not Opening on Macs | luciddaydream | Word | 0 | 03-15-2010 07:49 PM |