launching embedded objects

B

badazizi

I have a Word document that has an embedded Excel file. It is not a linked
file, it is embedded. How would I go about opening that embedded file using
a vba script?

Thanks,

J
 
H

Helmut Weber

Hi Badazizi,

like:

ActiveDocument.InlineShapes(1).OLEFormat.Activate
or
ActiveDocument.InlineShapes(1).OLEFormat.DoVerb wdOLEVerbOpen
or
ActiveDocument.Shapes(1).OLEFormat.Activate
or
ActiveDocument.Shapes(1).OLEFormat.DoVerb wdOLEVerbOpen

You might find ...InlineShapes(1).OLEFormat.ClassType handy as well.

The problem is how to get back to Word programmatically.

--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
Top