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