Hi,
Im very new to this and it's the first time I've posted in here. I have tried to solve the issue by search the web but I don't think that I fully understand the problem.
When I run the code everything works fine; it opens the word document mail merge, then it open's the find entry box in the mailings tab on the ribbon. The problem occurs when I go back to the access document and I get a run time error '424' Object required. When i click debug the
is highlighted in yellow.
Below is the code in full
Any help would be appreciated.
Im very new to this and it's the first time I've posted in here. I have tried to solve the issue by search the web but I don't think that I fully understand the problem.
When I run the code everything works fine; it opens the word document mail merge, then it open's the find entry box in the mailings tab on the ribbon. The problem occurs when I go back to the access document and I get a run time error '424' Object required. When i click debug the
Code:
WordBasic.MailMergeFindEntry.Execute
Below is the code in full
Code:
Public Sub cmd_Run_Click()
Dim WrdApp As Word.Application
Dim WrdDoc As Word.Document
Set WrdApp = CreateObject("Word.Application")
WrdApp.Visible = True
WrdApp.Activate
Set WrdDoc = WrdApp.Documents.Open("J:\filepath.docx")
With WrdDoc.mailmerge
.MainDocumentType = wdFormLetters
.Destination = wdSendToNewDocument
.OpenDataSource Name:="J:\filepath.mdb", sqlstatement:="SELECT * FROM [CRB]"
.ViewMailMergeFieldCodes = wdToggle
WordBasic.MailMergeFindEntry.Execute
End With
End Sub
Any help would be appreciated.