Help on Maximizing Word
Green VBAer, really green. Here is some code I conjured up through many different postings that works with what I have. I am trying to mailmerge a record from a query with the click of a button.
The only downfall on this is that I can’t get Word to maximize, it stays minimized on the bottom of my screen. I added
objWord.Application.WindowState = wdWindowStateMaximize, but I get a compile error that says variable not defined and points to the “wdWindowStateMaximize” – What do I need to change to make Word be maxmimized?
Private Sub cmdTest_Click()
Dim objWord As Object
Set objWord = GetObject(“d:dataindependent contract.doc”, “word.Document”)
objWord.Application.Visible = True
objWord.Application.WindowState = wdWindowStateMaximize
With objWord
.Mailmerge.execute
End With
End Sub