AutoNumber Macro in Protected Form

T

TechieMom

Good Day:

I'm using the code referenced here:
http://word.mvps.org/FAQs/MacrosVBA/NumberDocs.htm

to autogenerated a numbering system. But because my .dot document is a
protected form the code will not run. I receive this error:

"This method or property is not available because the object referes to
a protected area of the doc."

We need to use a protected form because the users of the document need
to tab between fields.

Thanks in advance,

Melanie
 
D

Doug Robbins - Word MVP

Set up a FormField in the template, giving it the name of Order and use the
following

ActiveDocument.FormFields("Order").Result = Format(Order, "00#")

in place of

ActiveDocument.Bookmarks("Order").Range.InsertBefore Format(Order, "00#")

in the code in the article

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
T

TechieMom

I have changed the code as you have indicated and now it just won't
work. No error message or anything.

I'm wondering if I'm added the form field incorrectly. I'm insert a
text field and giving it a bookmark name of Order. Is there a
different way?

Thanks for your help!


Melanie
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top