Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recording Macros

Status
Not open for further replies.

Igwiz

Technical User
Jun 3, 2003
88
CA
Hi,

How can I use the Macro Recorder to record actions outside of Excel eg Open up Word and Load a File?

Thanks,
Ig
 
As far as I know the macro recorder only works to record actions in that program.

Record a macro then edit it via tools/macro/ and use something like

Dim RetVal
RetVal = Shell("""C:\Program Files\Microsoft Office\Office\winword.exe"" ""\\ServerNo\PathTofolder\filename.doc""", 1)

to open the target application and file.

Hope this gives you a clue

Telephoto
 
Macro Record definitely does not record outside of the app that is recording.

Telephoto is right. Make a macro then edit it. However, you could also create an instance of Word and get it to load a file without using Shell.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top