Inserting a sentence with choices through a dropdown combo box !!

G

gravesen

When insering a sentence I would like to be abble to choose between som
different words in a drop down.
The Dropdown combo box is active from with in the sentence inserte
into word.
I have a little picture that showes what I mean I think :)


If I look at this code:
------------------------------------
Sub VisøgeretveletableretfirmaItalien()
'
' VisøgeretveletableretfirmaItalien Makro
' Makro indspillet 27-01-2004 af lgr
'


Selection.TypeText Text:= _
"We are looking for an established company who can represent us i
Italy."
Selection.Comments.Add Range:=Selection.Range
Selection.TypeText Text:="Vi søger et veletableret firma, der ka
repræsentere os i Italien."
ActiveWindow.ActivePane.Close

End Sub

-----------------------------------------

I choose one sentence and this is inserted. But as u see I have a wor
like company inserted. I would like in word to click on this sentenc
and through a dropdown combobox choose between other words.

I have a static text in the document where it is also possible t
choose other words, but this is made with a combobox that was inserte
on a fixed place in the document. I would like to insert the dropdow
together with the sentence.

I think that I need to mix the code above with something like this bu
need to insert this dropdown combobox inside the sentence above an
dynamicly create this combobox together with the sentence.

Private Sub Document_Open()
Dim vColor, vColors
vColors = Array("Company", "Partner", "Sales")


For Each vColor In vColors
ComboBox1.AddItem vColor
Next
ComboBox1.ListIndex = 0
ComboBox1.AutoSize = True
End Sub

Any ideas :)

Thanks
Lars Gravesen
(e-mail address removed)

*company

+----------------------------------------------------------------
| Attachment filename: sentence.gif
|Download attachment: http://www.WordForums.com.com/forums/attachment.php?postid=126806
+----------------------------------------------------------------
 
P

Peter Hewett

Hi gravesen

Hasn't Doug Robbins already provided a comprehensive answer to this question?

HTH + Cheers - Peter
 
D

Doug Robbins - Word MVP

As he is posting via Irubin's crappy wordforums.com website, the answer that
I posted may not have appeared there yet.

--
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