Archive of Mr Excel Message Board

Back to Other Office and Excel archive index
Back to archive home

Opening Other applications
Posted by Mark Crawford on February 07, 2002 3:42 AM
I'm having a bit of trouble.
I need to open microsoft word from excel in a macro. I've tried doing it from Access and then copying the code but that does't work. Does anyone know the code for opening word from excel in a macro.
Cheers.

Re: Opening Other applications
Posted by DK on February 07, 2002 4:09 AM
Hi Mark,
There are a few ways you can do this. Here's one...
Sub OpenWord()
Dim wdApp As Object
Set wdApp = CreateObject("Word.Application")
wdApp.Visible = True
'You can now work with Word from within Excel code e.g
wdApp.documents.Open "c:\test.doc"
End Sub
Any other questions, let me know,
D

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.