meandmyhorse
New member
- Local time
- Today, 16:02
- Joined
- Jul 31, 2002
- Messages
- 6
Help on Maximizing Word
Two things....here is another options for those struggling to make Access launch Word and do a mail merge. Of all the samples listed on this board, I couldn't get them to work (green VBA'er here), but this one works!! Yeah!! I created a query so that only the current record is available, then on the click of a button it opens word and merges the current record with the word file.
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" - any help would be appreciated.
Private Sub cmdTest_Click()
Dim objWord As Object
Set objWord = GetObject("d:\data\independent contract.doc", "word.Document")
objWord.Application.Visible = True
objWord.Application.WindowState = wdWindowStateMaximize
With objWord
.Mailmerge.execute
End With
End Sub
Two things....here is another options for those struggling to make Access launch Word and do a mail merge. Of all the samples listed on this board, I couldn't get them to work (green VBA'er here), but this one works!! Yeah!! I created a query so that only the current record is available, then on the click of a button it opens word and merges the current record with the word file.
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" - any help would be appreciated.
Private Sub cmdTest_Click()
Dim objWord As Object
Set objWord = GetObject("d:\data\independent contract.doc", "word.Document")
objWord.Application.Visible = True
objWord.Application.WindowState = wdWindowStateMaximize
With objWord
.Mailmerge.execute
End With
End Sub