View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
eedev eedev is offline
external usenet poster
 
Posts: 2
Default Embedded OleObject displayed as icon

Michel,

Thanks for your response, but your response answers whether an OleObject is
Embedded. What I am looking for is a way to determine after an embedded
OleObject is discovered, if the embedded object is displayed as an icon or
the contents are displayed inline.

For example, I created an excel spreadsheet and embedded another excel
spreadsheet into it with the "Display as Icon" option chosen. I then choose
another excel spreadsheet to embed without the "Display as Icon" option. I
then step into the debugger and both have OleType = 1 (xlOleEmbed) and ProgID
of "Excel.Sheet.8" but I want to be able to tell if any embedded objects are
displayed as an icon.

Thanks,

eedev


"Michel Pierron" wrote:

Hi eedev,
You could test:

If ActiveSheet.OLEObjects.Count = 0 Then Exit Sub
With ActiveSheet.OLEObjects(1)
If .progID = "Package" And .OLEType = 1 Then
' Your code

End If
End With

MP

"eedev" a écrit dans le message de news:
...
In Word, there is a property DisplayAsIcon to indicate if an OleObject is
displayed as an icon or not. In Excel, PowerPoint and other office
applications, this property doesn't exist and I need to determine if the
whole OleObject is shown or if it is displayed as an icon. I've searched
and
seen the questioned asked, but no one ever replies. Any help would be
appreciated.