Prev: Method 'OnTime' of object'_Application failed
Next: restrict a product eg 10*5=40 because 40 is maximum
From: ldb on 29 May 2010 05:51 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
From: Peter T on 29 May 2010 10:28 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" <ldb_texas(a)verizon.net> wrote in message news:ACFDA381-45CA-4A83-9BF6-89838561836D(a)microsoft.com... >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 >
From: ldb on 3 Jun 2010 06:02 Thanks for your suggestion... This provides Object specific information, but the actual filename remains elusive - any additional thoughts? ldb "Peter T" <peter_t(a)discussions> wrote in message news:%23hgepsz$KHA.3840(a)TK2MSFTNGP02.phx.gbl... > 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" <ldb_texas(a)verizon.net> wrote in message > news:ACFDA381-45CA-4A83-9BF6-89838561836D(a)microsoft.com... >>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 >> > >
From: Peter T on 3 Jun 2010 10:02
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" <ldb_texas(a)verizon.net> wrote in message news:91389950-153D-4CF9-9B72-F15355E05C54(a)microsoft.com... > Thanks for your suggestion... > > This provides Object specific information, but the actual filename > remains elusive - any additional thoughts? > > ldb > "Peter T" <peter_t(a)discussions> wrote in message > news:%23hgepsz$KHA.3840(a)TK2MSFTNGP02.phx.gbl... >> 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" <ldb_texas(a)verizon.net> wrote in message >> news:ACFDA381-45CA-4A83-9BF6-89838561836D(a)microsoft.com... >>>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 >>> >> >> > |