Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / February 2006

Tip: Looking for answers? Try searching our database.

Mail Merge differences between 2000 and 2002

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bill S. - 22 Feb 2006 14:19 GMT
Hi,

Under Word 2000 the mail merge worked, but now that Office/Word 2002 has
been installed when the mail merge is executed, it brings up a 'Select
Table' dialog showing the list of tables within the database. There are two
problems with this dialog. The first is that it only allows one table to be
chosen (when there are two tables involved in the mail merge query), and
second the dialog is just not wanted! Does anybody have any ideas as to how
to resolve this problem?

Thanks for any help.
Doug Robbins - Word MVP - 22 Feb 2006 18:46 GMT
Word has only ever been able to use a single flat file as a data source.  It
has never been able to use two tables.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> Hi,
>
[quoted text clipped - 7 lines]
>
> Thanks for any help.
Bill S. - 23 Feb 2006 02:50 GMT
This is the code I've been using under 2000 for quite some time and it has
worked fine.

Query = _
        "SELECT [Clients].[ClientsID], [Clients].[Last Name], " & _
        "[Clients].[Active], [Retirement].* FROM [Clients],[Retirement] "

Query2 = _
        "WHERE Retirement.[Balance Due] <> 0.0 AND " & _
        "[Retirement].[Quarter] = '" & mShortQuarter & "' AND " & _
        "[Clients].[ClientsID] = [Retirement].[LinkToParent] AND " & _
        "[Clients].[Active] = 'Active' " & _
        "ORDER BY [Clients].[Last Name]"

Dim M As Word.MailMerge
Set M = Wrd.Documents(1).MailMerge
M.MainDocumentType = wdFormLetters
M.Destination = wdSendToNewDocument
Call M.OpenDataSource(Name:=GetDbName(), sqlstatement:=Query,
sqlStatement1:=Query2)
Call M.Execute

> Word has only ever been able to use a single flat file as a data source.
> It has never been able to use two tables.
[quoted text clipped - 10 lines]
>>
>> Thanks for any help.
Doug Robbins - Word MVP - 23 Feb 2006 05:09 GMT
Check out the OpenDataSource() function in the Visual Basic Help file.
There are probably more parameters that you need to specify due to
additional connection methods that were introduced in XP.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

> This is the code I've been using under 2000 for quite some time and it has
> worked fine.
[quoted text clipped - 32 lines]
>>>
>>> Thanks for any help.
Peter Jamieson - 23 Feb 2006 10:01 GMT
One thing you will almost certainly have to do is to follow the instructions
in this Knowledgebase article:

>> "Opening This Will Run the Following SQL Command" Message When You Open a
>> Word Document"
>>
>> at
>>
>> http://support.microsoft.com?kbid=825765

(The setting affects what happens when you open a data source in VBA as
well)

Peter Jamieson

> This is the code I've been using under 2000 for quite some time and it has
> worked fine.
[quoted text clipped - 32 lines]
>>>
>>> Thanks for any help.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.