Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I found this piece of code that opens Word from within an Excel macro
Private Sub Open_word_run_build_directory() Dim oWord As Object Dim oDoc As Object Dim wpath As String wpath = ActiveWorkbook.Path Set oWord = CreateObject("Word.Application") oWord.Visible = True Set oDoc = oWord.Documents.Open(wpath & "\build directory V6.doc") End Sub The Word doc €˜build directory V6.doc has a VBA macro in an AutoOpen subroutine that executes when it opens. Everything works fine except Excel closes after executing the above routine. I would like it to stay open. Nothing in the Excel code that follows the above subroutine is the cause of Excel closing so I have to assume that something about this routine is causing it or perhaps Excel VBA and Word VBA cannot execute at the same time. Any thoughts on this? -- russ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
starting Word from an Excel macro | Excel Programming | |||
Need macro that delete rows starting with specified letter/word | Excel Programming | |||
keyboard is locked after starting in both word and excel | Excel Discussion (Misc queries) | |||
Starting Word from Excel | Excel Programming | |||
Starting Excel from Word | Excel Programming |