Connecting Tech Pros Worldwide Help | Site Map

Problem with VB6 and mailmerge in Word

Allcomp
Guest
 
Posts: n/a
#1: Jul 17 '05
Hello,

I have a problem with a VB6 program that command a mailmerge with word
object.
The database is a MSDE Database.
In the two cases, the server is the same

The file c:\res.odc is empty (0 bytes), it is just here because Word
want it to be there.

str_Con has the connection string to the database server (the same as my
application

On WinXP and Office 2003 , I do a
..OpenDataSource Name:= "c:\res.odc", SQLStatement:="SELECT * FROM
""tb_custcorrespPrj"" " , Connection:=str_Con


and everything is fine.
On Win98/Me and word 2000, there is an error connecting to the
datasource (Word can not open the datas) number 5922

Does someone know if the syntax must be different between the two
Windows (or office) or if a specific module must be installed for the
mailmerge to work?

Thank you
Marc Allard
Allcomp
Allcomp
Guest
 
Posts: n/a
#2: Jul 17 '05

re: Problem with VB6 and mailmerge in Word


Hello,

I have seen the solution : the oledb method (odc file) only work with
office XP.
For Office 2000 and before, you must use the odbc method (FileDSN)

Thank you
Marc Allard
Allcomp

Allcomp wrote:[color=blue]
> Hello,
>
> I have a problem with a VB6 program that command a mailmerge with word
> object.
> The database is a MSDE Database.
> In the two cases, the server is the same
>
> The file c:\res.odc is empty (0 bytes), it is just here because Word
> want it to be there.
>
> str_Con has the connection string to the database server (the same as my
> application
>
> On WinXP and Office 2003 , I do a
> .OpenDataSource Name:= "c:\res.odc", SQLStatement:="SELECT * FROM
> ""tb_custcorrespPrj"" " , Connection:=str_Con
>
>
> and everything is fine.
> On Win98/Me and word 2000, there is an error connecting to the
> datasource (Word can not open the datas) number 5922
>
> Does someone know if the syntax must be different between the two
> Windows (or office) or if a specific module must be installed for the
> mailmerge to work?
>
> Thank you
> Marc Allard
> Allcomp[/color]
Closed Thread