Problem with VB6 and mailmerge in Word

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Allcomp

    Problem with VB6 and mailmerge in Word

    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
    ..OpenDataSourc e Name:= "c:\res.odc ", SQLStatement:=" SELECT * FROM
    ""tb_custcorres pPrj"" " , 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

    #2
    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_custcorres pPrj"" " , 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]

    Comment

    Working...