Word Macro help - creating bookmarks and fields based on value entered

E

emu

I have created a template where I am entering author details (name
position and location) for a small newsletter like publication however
I have only set the template up to have one author and if there are
multiples I will need to copy and paste to add any extra authors.

I would like to ask a question to the person completing the template -
How many authors? and then create the multiple bookmarks for Author1
name and Author1 position ...., Author2 name and so on until Authorx
for the number in question.

This seems like it should be possible does anyone have any example
code.

I didn't want the end user to have to copy and paste or delete an extra
fields as this creates more problems.
 
B

Beth Melton

Ideally, if you are creating a template that requires user input then
your best option would be to create a UserForm and use a combo box to
select the number of Authors to be added. Add additional text boxes on
the UserForm can be easily added according to the number selected in
the combo box. Then depending on how your template is setup, such as
the authors are listed one after another, you can use a single
bookmark and populate it with a concatenated authors string.

Even if this may seem like more work in the long run it isn't and it
will save you and those filling out the documents time in the end. :)

If you need help getting started then you may want to post follow-up
questions to one of the Word VBA newsgroups since that's where the VBA
experts hang out and you're likely to obtain a *much* faster response
than you will in this newsgroup.

Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.

~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP

Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
 

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