Macros and Text Boxes

J

JGreg7

I am trying to create a form using ASK fields. The form has several text
boxes each with different data in them.

The problem I am working with is the Autonew macro. When I “select all†so
I can update the fields, the text in the text boxes does not become selected,
and therefore does not update.

Is there another way to select the text in these boxes?

Alternatively, if that is not possible, is there any way to lock the text
box size and location to prevent someone from moving them?
 
G

Graham Mayor

If it really is a form you are creating then you would be better creating a
protected form using form fields to collect the user input. Cross references
to form fields, provided they are in the body of the document do not require
macros to update them. Simply check the calcukate on exit property of the
form field.
Forms are probably better laid out using tables or frames than text boxes,
which are essentially drawing elements and not in the text layer of the
document. If the table cells are made to fixed dimensions and the form
protected the user will not readily be able to move the position of the
content.
You can update fields in a text box with a macro. The sample code at
http://www.gmayor.com/installing_macro.htm should do that.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

JGreg7

Thank you for your response.

I used one of your suggestions to remove the text boxes from the drawing
canvas (which seems to be created any time you insert a text box). Once I
did that I was able to convert the text box to a frame, which I could then
update.
 
G

Graham Mayor

Automatic use of the drawing canvas is a user selectable option from Word
Options > Advanced > Editing Options (Word 2007) or Tools > Options >
General in earlier versions.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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