Hi,
how I can run embeded object in the word when I open the word document.
the en=mbeddedplease I need your help. object is an execution file.
like this:
Sub Autoopen()
ActiveDocument.InlineShapes(1).OLEFormat.Activate
SendKeys "r", True
End Sub
Place Autoopen in the document.
Whether sendkeys is required may depend on your version of windows,
on the program you are going to start, and on the security settings.
Tested with notepad.exe and explorer.exe.
I couldn't find another method to overcome security settings.
Sure, you have to know, which inlineshape's oleformat
you want to activate. Could be a shape as well.
You could also use:
ActiveDocument.InlineShapes(1).OLEFormat.DoVerb (wdOLEVerbPrimary)
HTH
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"