Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need List of Embedded Files
I have a workbook with 40 +/- embedded files (Word, Excel, eMail,
PowerPoint) I have been able to able to identify the Objects as "Object #" and BottomRightCell address. I appreciate any thoughts as to how get a list of the actual names of the embedded files. Thanks. ldb |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need List of Embedded Files
Try something like this
Sub test() Dim ot As XlOLEType Dim ole As OLEObject For Each ole In ActiveSheet.OLEObjects ot = ole.OLEType If ot = xlOLELink Then Debug.Print ole.Name, ole.TopLeftCell.Address, ole.SourceName ElseIf ot = xlOLEEmbed Then Debug.Print ole.Name, ole.TopLeftCell.Address, ole.progID, " Embedded" End If Next End Sub Press Ctrl-g to see debug results in the Immediate window. Regards, Peter T "ldb" wrote in message ... I have a workbook with 40 +/- embedded files (Word, Excel, eMail, PowerPoint) I have been able to able to identify the Objects as "Object #" and BottomRightCell address. I appreciate any thoughts as to how get a list of the actual names of the embedded files. Thanks. ldb |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need List of Embedded Files
Thanks for your suggestion...
This provides Object specific information, but the actual filename remains elusive - any additional thoughts? ldb "Peter T" <peter_t@discussions wrote in message ... Try something like this Sub test() Dim ot As XlOLEType Dim ole As OLEObject For Each ole In ActiveSheet.OLEObjects ot = ole.OLEType If ot = xlOLELink Then Debug.Print ole.Name, ole.TopLeftCell.Address, ole.SourceName ElseIf ot = xlOLEEmbed Then Debug.Print ole.Name, ole.TopLeftCell.Address, ole.progID, " Embedded" End If Next End Sub Press Ctrl-g to see debug results in the Immediate window. Regards, Peter T "ldb" wrote in message ... I have a workbook with 40 +/- embedded files (Word, Excel, eMail, PowerPoint) I have been able to able to identify the Objects as "Object #" and BottomRightCell address. I appreciate any thoughts as to how get a list of the actual names of the embedded files. Thanks. ldb |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Need List of Embedded Files
It depends how the file was originally embedded. If it is not "linked" to
file the original file name is lost, from now on the file will be embedded within the host file. IOW you can't find want doesn't exist. When the file is activated it has a file name unique to the host file, say an Excel an embedded but not linked Excel file exists in a Word, when activated it will show a name like "Worksheet in host-file", but you can only see that name the newly activated Excel application, not in Word. However if the file remains linked you should be able to return its file name the was I suggested. What does ole.SourceName return for you. If the above doesn't help, explain what you have (with an example of how you created it) and what you are looking for. Regards, Peter T "ldb" wrote in message ... Thanks for your suggestion... This provides Object specific information, but the actual filename remains elusive - any additional thoughts? ldb "Peter T" <peter_t@discussions wrote in message ... Try something like this Sub test() Dim ot As XlOLEType Dim ole As OLEObject For Each ole In ActiveSheet.OLEObjects ot = ole.OLEType If ot = xlOLELink Then Debug.Print ole.Name, ole.TopLeftCell.Address, ole.SourceName ElseIf ot = xlOLEEmbed Then Debug.Print ole.Name, ole.TopLeftCell.Address, ole.progID, " Embedded" End If Next End Sub Press Ctrl-g to see debug results in the Immediate window. Regards, Peter T "ldb" wrote in message ... I have a workbook with 40 +/- embedded files (Word, Excel, eMail, PowerPoint) I have been able to able to identify the Objects as "Object #" and BottomRightCell address. I appreciate any thoughts as to how get a list of the actual names of the embedded files. Thanks. ldb |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Save Embedded Files | Excel Programming | |||
Embedded files | Excel Discussion (Misc queries) | |||
embedded wav files | Excel Discussion (Misc queries) | |||
Embedded files in Excel | Excel Programming | |||
embedded files | Excel Programming |