Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / January 2005

Tip: Looking for answers? Try searching our database.

Returning the value of a InlineShape

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jill E - 05 Jan 2005 04:20 GMT
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

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.