G
Guest
Hi, I'm getting an error message "User-Defined Type Not Defined"
my code is as follows:
Function MergeIt()
Dim objWord As Word.Document
Set objWord = GetObject("C:\Sample DB Code\Word\NoticeFirst.doc",
"Word.Document")
' Make Word visible.
objWord.Application.Visible = True
' Set the mail merge data source as the newtheatreforms database.
objWord.MailMerge.OpenDataSource _
Name:="C:\_WORKING DATABASES\VideoLibrary.mdb",
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="",
WritePasswordDocument:="", _
WritePasswordTemplate:="", Revert:=False, Format:=0, _
Connection:="TABLE qNotice", _
SQLStatement:="SELECT * FROM [qNotice]"
' Execute the mail merge.
objWord.MailMerge.Execute
End Function
I knwo it's probably a very simple problem, but evidently my brain isn't
functioning today.
Thanks for any help.
my code is as follows:
Function MergeIt()
Dim objWord As Word.Document
Set objWord = GetObject("C:\Sample DB Code\Word\NoticeFirst.doc",
"Word.Document")
' Make Word visible.
objWord.Application.Visible = True
' Set the mail merge data source as the newtheatreforms database.
objWord.MailMerge.OpenDataSource _
Name:="C:\_WORKING DATABASES\VideoLibrary.mdb",
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="",
WritePasswordDocument:="", _
WritePasswordTemplate:="", Revert:=False, Format:=0, _
Connection:="TABLE qNotice", _
SQLStatement:="SELECT * FROM [qNotice]"
' Execute the mail merge.
objWord.MailMerge.Execute
End Function
I knwo it's probably a very simple problem, but evidently my brain isn't
functioning today.
Thanks for any help.