Pausing/resuming execution for user input

K

Kathy Ramey

I am building a Word template with bookmarks for locations for user input.

I would like to have the insertion point move between these bookmarks in a
certain order, therefore I was going to set up my script to go to a
specified bookmark, pause for user input, then resume when the user hits
ENTER to move onto the next specified bookmark.

I have figured out how to do everything but the pause and resume on ENTER.

As a former Wordperfect user, this was very simple to do while recording a
macro, however I am not sure how it is done via VBA.

I realize I could do this with a user form, but I would prefer to not to
unless it becomes absolutely necessary.

Any help would be MOST appreciated!

Kathy
 
J

Jezebel

Bookmarks don't really support this sort of functionality. Form fields (not
the same as a user form) do what you describe automatically, without
requiring any scripting at all ... the cursor automatically moves from field
to field. Add the forms toolbar to your document and experiment from there.
 
K

Kathy Ramey

I should have mentioned this in my first post...

I can't use a form as I need the user to be able to do more than just enter
text.

Thanks for the reply, though!

Kathy
 
D

Doug Robbins - Word MVP

Hi Kathy,

I would be using a userform that is called by an autonew macro in the
template. The form would contain controls into which the user could enter
all of the data that is to be placed into the bookmarks.

See the article “How to create a Userform” at:

http://www.mvps.org/word/FAQs/Userforms/CreateAUserForm.htm

When you use a userform, there are no restrictions on what the user can do,
as is the case if your were to use formfields in a protected document.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

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