Quote:
> DDE is a bit old hat and not that easy to work with. Easier to either
> (1) write a VBS script to do what you want, then use FM's Send Message
> script step to fire the VBS,
Should have added a demo: lets say you have an Excel file called
somestuff.xls in folder c:\my folder which has a macro called DoSomething.
The following trick will open the file and run that macro automatically:
Copy the following 4 lines and save in Notepad to a file called (say)
RunExcel.vbs in (say) c:\scripts. The file MUST have the .vbs suffix.
'----
Set objXL = WScript.CreateObject("Excel.Application")
objXL.visible = true
objXL.workbooks.open "c:\my folder\somestuff.xls"
objXL.run "somestuff!DoSomething"
'----
All you then do is create an FM script using the Send Message step. Put the
path to the VBS file in the text box (including the quotes):
"C:\scripts\RunExcel.vbs"
and also untick Bring Application to Foreground.
When you run the the FM script, FM will fire off the VBS file which in turn
opens the Excel file and runs the macro. Just change names/paths to suit.
--
Regds, Bob Osola