Home |
Search |
Today's Posts |
#3
![]() |
|||
|
|||
![]()
Assuming that you are not seeing a problem that has the same cause and
solution as is described in the following article: http://support.microsoft.com/default...b;en-us;825765 I would a. ensure that Word can "see" the query "Qry-MAILSHOT ADDRESSES" when you try to connect to the data source manually. The problem is that the old connection method used by default in Word 2000 and earlier (DDE) let Word use most queries. The new default (OLEDB) excludes a number of types of query. You can revert to DDE by checking Word Tools|Options|General|COnfirm conversions at open and going through the connection process again, or using the parameter Subtype:=wdMergeSubtypeWord2000 in your OpenDataSource call. You might also need to use that parameter if you were opening the data source using ODBC. b. try changing the query syntax to use a table alias, e.g. something like SELECT q.* FROM [Qry-MAILSHOT ADDRESSES] q WHERE ((q.[Mail_Merge_1] = -1)) Peter Jamieson "jonmarcr" wrote in message ... We wrote macros to link up to one of four "mail queues" derived from our access database. In Office 97 and then in Office 2000 they worked well but in office 2003 we simply cannot get them to work properly. The old syntax was: Sub Merge1Q() ' ' Merge_1 Macro ' Macro recorded 08/05/2004 by Jon Marc ' ActiveDocument.MailMerge.DataSource.QueryString = _ "SELECT * FROM [Qry-MAILSHOT ADDRESSES] WHERE (([Mail_Merge_1] = -1))" & _ "" End Sub This now gives us run time error 4198 The data source for this user is: MAIL MERGE DATA (JMR) Qry-MAILSHOT ADDRESSES (in "My data sources" folder) (each user has his own sub-table and so another user will have MAIL MERGE DATA (PEC) Qry-MAILSHOT ADDRESSES and so on. Within each table there are all the addresses selected for the 4 possible mailshots and by manually selecting queue=-1 for either 1,2,3 or 4 we can get it to work. However we simply want a macro to do this for us to avoid errors. Can anyone help please? -- jon |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mail Merge Word 2003 Issue | Mailmerge | |||
mail merge with attachments | Mailmerge | |||
Proteced Form with Mail Merge Section-Mail Merge is "lost" whe | Microsoft Word Help | |||
Word-Excel 2003 - Mail Merge Recipients problem | Mailmerge | |||
Using Hyperlinks in Mail Merge IF...THEN...ELSE Statements | Mailmerge |