Determine type of OLE Control Object

D

Dale Fye

I'm trying to determine how I can identify the type (textbox, label,
checkbox, listbox, combobox, ...) of an OLE Control Object that is on a
slide, programatically.

I want to be able to click on a shape in design view, then run a macro that
will tell me the type of a OLE Control object I have selected. Then, if it
is one that has a Text property, I want to display that. If it has a
caption property, I want to display that. If it has a list of items
(listbox or combo box), I would like to display the text associated with
each of the items.

I've got some rudimentary code that handles the ones with captions and
textboxes, but have not figured out how to iterate through the items in the
list of a combo or listbox. I know it has to be something like:

oShp.OLEFormat.Object.????????
 
S

Steve Rindsberg

Manipulating Listbox and Combobox controls on slides and forms
http://www.pptfaq.com/FAQ00439.htm

Also, create a form and add the equivalent controls to it then use VBA help and
the properties viewer to see the available properties and methods. By
appending them to .OLEFormat.Object you can work with OLE controls on a slide
 

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