M
MAC
Hello:
I am trying to merge fields from all records in an Access database to Word
document (with the merge fields already in it). It works well, but I need
to tell Access to do the merge ALL that meet two condtions: 1) if a field
named "done" is UNchecked and 2) if the field "Letter1" is CHECKED (the same
will continue for Letter2, Letter3 & Letter 4). How & where do I place
these conditions? The event I placed in a button is:
Private Sub Command1_Click()
Dim App As Word.Application
Dim Doc As Word.Document
Set App = New Word.Application
Set Doc = App.Documents.Open("C:\NAME OF FOLDER\Letter1.doc")
App.Visible = True
App.WindowState = wdWindowStateMaximize
With Doc.MailMerge
.Execute (done = False)
Doc.Close False
End With
End Sub
Any help will be appreciated!
I am trying to merge fields from all records in an Access database to Word
document (with the merge fields already in it). It works well, but I need
to tell Access to do the merge ALL that meet two condtions: 1) if a field
named "done" is UNchecked and 2) if the field "Letter1" is CHECKED (the same
will continue for Letter2, Letter3 & Letter 4). How & where do I place
these conditions? The event I placed in a button is:
Private Sub Command1_Click()
Dim App As Word.Application
Dim Doc As Word.Document
Set App = New Word.Application
Set Doc = App.Documents.Open("C:\NAME OF FOLDER\Letter1.doc")
App.Visible = True
App.WindowState = wdWindowStateMaximize
With Doc.MailMerge
.Execute (done = False)
Doc.Close False
End With
End Sub
Any help will be appreciated!