Hi,
I am trying to return the value of a combobox that I have inserted into a
Word document. It is not a formfield because my list needs to consist of
more than 25 members. As a result, I inserted a VBA control directly into
the document.
After doing this, I initialized the objects in the normal way, but haven't
been able to isolate the code to return the current value. I was able to
determine that controls inserted in this fashion are viewed programmatically
as an inlineshape, and so far everything points to this being correct.
Unfortunately I haven't found any documentation where the inlineshape is
anything other than a graphic object.
Could it be...
activedocument.inlineshapes(1).????
Can someone please send me in the right direction?
Desperate for help!
Thanks,
Jill
Helmut Weber - 05 Jan 2005 09:13 GMT
Hi Jill,
like:
With ActiveDocument.InlineShapes(1).OLEFormat.Object
MsgBox .Value
End With
You might want to check the type, too:
' wdInlineShapeOLEControlObject = 5
If ActiveDocument.InlineShapes(1).Type = 5 Then
MsgBox "yes"
End If
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000