Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
ldb ldb is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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   Report Post  
Posted to microsoft.public.excel.programming
ldb ldb is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save Embedded Files Sandeep Warrier Excel Programming 1 October 23rd 09 03:17 PM
Embedded files Lindae Excel Discussion (Misc queries) 1 May 18th 09 12:08 PM
embedded wav files ARGT Excel Discussion (Misc queries) 4 July 21st 08 10:53 AM
Embedded files in Excel jminickene Excel Programming 0 October 8th 04 02:41 AM
embedded files nath Excel Programming 0 September 17th 03 02:17 PM


All times are GMT +1. The time now is 06:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"