ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro - Open Word with Excel macro (https://www.excelbanter.com/excel-discussion-misc-queries/27362-macro-open-word-excel-macro.html)

Bill

Macro - Open Word with Excel macro
 
Hello,

Can I launch Word from within an Excel macro? If so, how?

Bill



FxM

Bill a écrit :
Hello,

Can I launch Word from within an Excel macro? If so, how?

Bill




Hi Bill,

Something like :
Sub test()
Set ww = CreateObject("word.application")
ww.Visible = True
End Sub

HTH
FxM

Nick Hodge

Or using early binding (You will need to manually set a reference to the
Word Object Library through Tools...References... in the VBE)

Sub RunWord()
Dim wd As Word.Application
Set wd = New Word.Application
wd.Visible = True
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"FxM" wrote in message
...
Bill a écrit :
Hello,

Can I launch Word from within an Excel macro? If so, how?

Bill



Hi Bill,

Something like :
Sub test()
Set ww = CreateObject("word.application")
ww.Visible = True
End Sub

HTH
FxM




Bill

Thanks FxM, Nick

"Nick Hodge" wrote in message
...
Or using early binding (You will need to manually set a reference to the
Word Object Library through Tools...References... in the VBE)

Sub RunWord()
Dim wd As Word.Application
Set wd = New Word.Application
wd.Visible = True
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
HIS


"FxM" wrote in message
...
Bill a écrit :
Hello,

Can I launch Word from within an Excel macro? If so, how?

Bill



Hi Bill,

Something like :
Sub test()
Set ww = CreateObject("word.application")
ww.Visible = True
End Sub

HTH
FxM







All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com