PDA

View Full Version : UserForm and DropDown in Word



alex1989
02-09-2011, 06:58 AM
Hi, I have a word document where I created a userform for the users that have to enter informations. I would like for it to place the infos in the word document. In fact, the users click on the macro which load the userform. In the userform, there are textboxes where they enter informations and when they click "OK" the informations are directly insert in some textboxes on the word document. Can someone help please?

Also, I would like to have some dropdown for the users to choose options. The objectif is for the users to save time by not having to type there text. So I'm gonna give them dropdown where they choose the standard sentences and when they click on their choice, they can change it by typing themself, like if they want to add some informtions to the sentence.

Thanks

Tinbendr
02-09-2011, 08:41 AM
Oh, boy, were do I start?


The object is for the users to save time by not having to type their text. Autotext can do this without having to add a bunch of overhead with userforms. You can create a template with all the autotext entries so they can enter a shortcut word/phrase and the information be inserted.


there are textboxes where they enter informations and when they click "OK" the informations are directly insert in some textboxes on the word document.What kind of textboxes? Depending on your requirements, a particular one might be more effective than the others.

You can also use bookmarks. They are invisible and act as placeholders in the documents. A good tool to insert text, but they are not without their own problems.

If you could describe your document a little more in detail, I'm sure we could help you with a solution.

David

alex1989
02-09-2011, 09:51 AM
I don't know what is Autotext and how to use it. And for the textbox, I kinda find out lol. I put, in my command button click code, the code for creating a textbox with the coodinate where I want it to be and with the text I want to be in. So when I declared my variables "as string" and then I told the code that the text I want in the new added textbox is my variable; the correct text appear in the box. But if you can explain more on the autotext I would appreciate. For the details, the users have a report to complet with many sentences to type. But the sentences are often the 5 same for each category. So I want them to choose, by clicking, one or many of the sentence without having to type.

Thanks

IBihy
02-09-2011, 11:21 AM
Hello Alex,

not meaning to be abrasive, have a look at the Word help. Search for "Insert an AutoText entry" and read a little. As you describe it, I agree with Tinbendr that autotext may be a solution. If you tried it, and it isn't quite to the point, let the forum folks know.

Regards,
Isabella

IBihy
02-09-2011, 11:22 AM
Addendum: a former colleague of mine had a saying he never got tired of repeating: "Reading adds to your education". :-)))))

Tinbendr
02-09-2011, 11:29 AM
I don't know what is Autotext and how to use it. But if you can explain more on the autotext I would appreciate.

For the details, the users have a report to complete with many sentences to type. But the sentences are often the 5 same for each category. So I want them to choose, by clicking, one or many of the sentence without having to type.Autotext would be perfect for this. Press F1 and type in Autotext. MS has some very good tutorials. But breifly, as I described before, you type in a word/sentence(s)/paragraph(s)/page(s), highlight the text, (2007) Insert->Quick Parts->Save Selection to Quick Part Gallery. In the Type, pick the dropdown and select autotext.

So, for instance, you have 2-3 disclaimers you need to insert based on some factor. You could name the autotext Disclaim1, Disclaim2, etc. When you type in Disclaim1, autotext inserts the previous selection that includes Disclaimer #1. It's like a shorthand for anything in the document, even pictures.

Oh, and I understand about assigning the textboxes to the document, but you need to decide which direction to go before we spend al lot of time designing something for you. That's why I asked for you to attach a sample document.