Hello once again:
I'm still having an issue merging my Access table into MS Word's mail merge. Okay, what I'm trying to do in Word is have the user select the Name of event, Date of event, etc. I would like to have this using a dropdown box using Word instead of the Mail Merge wizard. Once the user selects this criteria, then the merge will be executed. Of course the dropdown boxes will have to see the Name and Date of events so that Word will already know what they are so the user can select it. I will not be able to type these names and dates into code because they change often. Below is my attempt to do this;
Sub pccmembers()
'
' pccmembers Macro
' Macro recorded 6/16/2005 by MEG17-18
'
ActiveDocument.MailMerge.MainDocumentType = wdFormLetters
ActiveDocument.MailMerge.OpenDataSource Name:= _
"F:\bsn\Test of AccessCustomerDatabaseXA.mdb", ConfirmConversions:=False, _
ReadOnly:=False, LinkToSource:=True, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _
WritePasswordTemplate:="", Revert:=False, Format:=wdOpenFormatAuto, _
Connection:= _
"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=F:\bsn\Test of AccessCustomerDatabaseXA.mdb;Mode=Read;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB
atabase Password="""";Jet OLEDB:Engine Typ" _
, SQLStatement:="SELECT * FROM `registration` where PCCMEMBER='Y'", SQLStatement1:="", _
SubType:=wdMergeSubTypeAccess
ActiveDocument.MailMerge.ViewMailMergeFieldCodes = wdToggle
End Sub
Please let me know if you need more information.
Thanks,
KJ
I'm still having an issue merging my Access table into MS Word's mail merge. Okay, what I'm trying to do in Word is have the user select the Name of event, Date of event, etc. I would like to have this using a dropdown box using Word instead of the Mail Merge wizard. Once the user selects this criteria, then the merge will be executed. Of course the dropdown boxes will have to see the Name and Date of events so that Word will already know what they are so the user can select it. I will not be able to type these names and dates into code because they change often. Below is my attempt to do this;
Sub pccmembers()
'
' pccmembers Macro
' Macro recorded 6/16/2005 by MEG17-18
'
ActiveDocument.MailMerge.MainDocumentType = wdFormLetters
ActiveDocument.MailMerge.OpenDataSource Name:= _
"F:\bsn\Test of AccessCustomerDatabaseXA.mdb", ConfirmConversions:=False, _
ReadOnly:=False, LinkToSource:=True, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _
WritePasswordTemplate:="", Revert:=False, Format:=wdOpenFormatAuto, _
Connection:= _
"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=F:\bsn\Test of AccessCustomerDatabaseXA.mdb;Mode=Read;Extended Properties="""";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB
, SQLStatement:="SELECT * FROM `registration` where PCCMEMBER='Y'", SQLStatement1:="", _
SubType:=wdMergeSubTypeAccess
ActiveDocument.MailMerge.ViewMailMergeFieldCodes = wdToggle
End Sub
Please let me know if you need more information.
Thanks,
KJ