Insert Text Before and After Bookmark Text

M

Melanie Strom

I have a template with a user form. Part of the final product includes
information that may or may not be present. The user form includes fields to
input a letter, number and description. This is repeated 6 times on the form
so different letters, numbers and descriptions can be entered (but not all 6
may be used).

When it comes to filling out the form after all the info is entered in the
user form, how can I enter the bookmark data in such a way to include other
text? If the first group of letter, number and description is filled out, I
want to enter a checkbox, then a tab character, then the result from the
letter text box, then another tab character, then "Class" and the result from
the number text box, then " - " and finally the description result. I do not
want to have the other info already on the form because not all six groups
will always be filled out. Then, if other groups are filled out, how do I
variably enter a line break?

I assume I will need to do this in my VBA code, but I'm not sure how to go
about it, being the novice that I am. Thank you!
 
D

Doug Robbins - Word MVP

You will need code in the user form that creates a string made up of the
components that are to be included including the text that is now being
inserted into the bookmark and inserts that into the .Range of the bookmark.

--
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, originally posted via msnews.microsoft.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