In word how do I obtain a user input which determines the text pr.

P

Phildover

I need to ask a user of a template to provide input that will determine which
text is printed in part of a document template. For instane if 1 is selected
certain text will appear, otherwise alternative text needs to be used.
 
S

Steve Lang

Hi Phildover

Depending on the number of options that you will have, you can use a message
box as a function, an input box or a user form. If only two options you can
use a message box similar to:

Sub foo
if msgbox("Print only part one?", vbyesno + vbQuestion) = vbyes then
'Code to print the part necessary
else
'print the whole document
end if

End sub

HTH and have a great day!

Steve
 

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