Autoformat as you type

C

Carny

I've created a word document as a form and have several fields people can
complete, one of them is a box with a number 1. before the field and when you
enter data in the field and press return it creates a numbered list. I want
to stop this happening. The form is password protected I've added some code
that is run when the form is opened.

Dim show As Boolean
show = False
ActiveDocument.Unprotect Password:="*********"
ActiveDocument.Application.Options.AutoFormatAsYouTypeApplyNumberedLists =
False
ActiveDocument.Protect Password:="********", Noreset:=True,
Type:=wdAllowOnlyFormFields
show =
ActiveDocument.Application.Options.AutoFormatAsYouTypeApplyNumberedLists
If show Then
MsgBox ("The Autoformat is off!")
Else
MsgBox ("The Autoformat is still on!!")
End If

But i always get the message that the autoformat in on and the document
always creates a numbered list. The form is opened in various word versions
from 97 upward. Please help???
 
C

Charles Kenyon

Get rid of the automatic numbering in your paragraph. You have to do this
when the document is unprotected. It probably involves changing the style.
You may have gotten the numbering style or formatting because you have Word
apply styles based on your typing (always a bad idea).
--
Charles Kenyon

Word New User FAQ & Web Directory: http://addbalance.com/word

Intermediate User's Guide to Microsoft Word (supplemented version of
Microsoft's Legal Users' Guide) http://addbalance.com/usersguide

See also the MVP FAQ: http://www.mvps.org/word which is awesome!
--------- --------- --------- --------- --------- ---------
This message is posted to a newsgroup. Please post replies
and questions to the newsgroup so that others can learn
from my ignorance and your wisdom.
 

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