C
carl
I have a button that opens a word 97 doc which works fine. How do I change
the focus from Access 97 to this word doc.
I've tried:
On Error GoTo CreateOb
Set wordApp = GetObject(, "Word.Application") 'use existing MS Word
wordApp.Application.Visible = True 'make Word visible
wordApp.Documents.Open (strPath) 'open the file
'wordApp.Documents(strPath).ActiveWindow.Activate
'wordApp.Windows(strPath).WindowState = wdWindowStateMaximize
Exit Sub
CreateOb:
Set wordApp = CreateObject("Word.Application") 'start MS Word
Resume Next
the focus from Access 97 to this word doc.
I've tried:
On Error GoTo CreateOb
Set wordApp = GetObject(, "Word.Application") 'use existing MS Word
wordApp.Application.Visible = True 'make Word visible
wordApp.Documents.Open (strPath) 'open the file
'wordApp.Documents(strPath).ActiveWindow.Activate
'wordApp.Windows(strPath).WindowState = wdWindowStateMaximize
Exit Sub
CreateOb:
Set wordApp = CreateObject("Word.Application") 'start MS Word
Resume Next