Mailmerge from VB to WORD 2002 with Access

C

chris

I have an application that uses Mailmerge into Word 2002 from an Access
database. At this point I'm extremely frustrated as this is a late
delivery on a commercial application.

The problem is that it runs on two machines that I have that have Word
2002, but refuses to behave on the client machine.

The behavior on my machine is that the template document opens and then
is replaced with the filled document. On the client machine the
template document opens, but then an empty Word dialog (no document)
pops up. It seems that the replacement starts to activate, and then
fails for no apparent reason.

Any comments would be extremely helpful.
 
C

chris

ADDENDUM

There is no blank WORD dialog. The template document opens and the fill
activity fails to take place. I did a test using msg to check the
variables and there was no change between my machine and the client.
 
D

Doug Robbins

That's still nowhere near enough to go on save that if it works on one
machine and not another, it must be something peculiar about that machine
that is causing the problem.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
C

chris

The code that fails is:

With oDobj.ActiveWindow.Document
.MailMerge.OpenDataSource Name:=stConn, SQLStatement:=strSQL,
SubType:=wdMergeSubTypeWord2000
.MailMerge.Execute
(etc.)

The development machine is running XP pro. The test machine is running
Win 2000.

The connect := is not used. I tested with and without the connect with
no affect on the process.
 
D

Doug Robbins

While the SubType attribute does appear when entering the .OpenDataSource
into the VBE, it is not documented in the Help file so I don't know what it
does. I would suggest that you try deleting it.

--
Please respond to the Newsgroup for the benefit of others who may be
interested. Questions sent directly to me will only be answered on a paid
consulting basis.

Hope this helps,
Doug Robbins - Word MVP
 
C

chris

The SubType is a new 'feature' provided by MS because of changes made
to MS Word that allows for 'backward' compatibility with earlier
versions of Word. It is, indeed, undocumented, which is also mentioned
in the MSDN postings.

Without SubType, the application won't run on my machine. MS says this
should allow the expected process to occur on any machine with Word
2002, which is where I have a problem, as this is apparently not the
case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top