ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Embedded OleObject displayed as icon (https://www.excelbanter.com/excel-programming/377625-embedded-oleobject-displayed-icon.html)

eedev

Embedded OleObject displayed as icon
 
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.

Michel Pierron

Embedded OleObject displayed as icon
 
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.




eedev

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.





aw[_2_]

Looking into the same problem
 
Hi eedev,

did you get an answer to your question? i have the same question too. please let me know if you have discovered an answer.

thanks
aw



eede wrote:

Michel, Thanks for your response, but your response answers whether an
18-Nov-06

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:

Previous Posts In This Thread:

On Friday, November 17, 2006 11:29 AM
eede wrote:

Embedded OleObject displayed as icon
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.

On Saturday, November 18, 2006 9:09 AM
Michel Pierron wrote:

Embedded OleObject displayed as icon
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:
...

On Saturday, November 18, 2006 11:51 PM
eede wrote:

Michel, Thanks for your response, but your response answers whether an
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:


Submitted via EggHeadCafe - Software Developer Portal of Choice
WPF Custom Validation Using the Enterprise Library
http://www.eggheadcafe.com/tutorials...ation-usi.aspx

joel[_719_]

Looking into the same problem
 

You can use the typeName method


For Each obj In ActiveSheet.OLEObjects
a = TypeName(obj.Object)
Next obj


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=182048

Microsoft Office Help



All times are GMT +1. The time now is 12:08 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com