P
Peter Wyss
Hello,
I have created a serial letter with the odbc-source (jiraissue table on
our server server01) with the following macro:
Option Explicit
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
ActiveDocument.MailMerge.DataSource.QueryString = _
"SELECT * FROM `jiraissue` WHERE ((`PROJECT` = '" _
& txtProject.Text & "'))"
End Sub
When this dot-template start, a form start up. In this form, the user
can type the Projectnumber. Then Word should list all Documents with
this Projectnumber. But when i click OK on my form an error occured:
Run-time error 4198: command failed
The problem occured in the
ActiveDocument.MailMerge.DataSource.QueryString Statement. What could be
the problem? Does anyone have a turtorial or something like that?
PS: I'm using Office xp (i don't know, if serial letter is the right
translation...serial letter means serienbrief in german![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Thanks a lot,
Peter
I have created a serial letter with the odbc-source (jiraissue table on
our server server01) with the following macro:
Option Explicit
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
ActiveDocument.MailMerge.DataSource.QueryString = _
"SELECT * FROM `jiraissue` WHERE ((`PROJECT` = '" _
& txtProject.Text & "'))"
End Sub
When this dot-template start, a form start up. In this form, the user
can type the Projectnumber. Then Word should list all Documents with
this Projectnumber. But when i click OK on my form an error occured:
Run-time error 4198: command failed
The problem occured in the
ActiveDocument.MailMerge.DataSource.QueryString Statement. What could be
the problem? Does anyone have a turtorial or something like that?
PS: I'm using Office xp (i don't know, if serial letter is the right
translation...serial letter means serienbrief in german
Thanks a lot,
Peter