473,385 Members | 1,478 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

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
..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
Jul 17 '05 #1
1 4448
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:
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

Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Squirrel | last post by:
Hi everyone, I've created a mail merge Word doc. (using Office XP) , the data source is an Access query. Functionality I'm attempting to set up is: User sets a boolean field to true for...
1
by: Shannon Rotz | last post by:
I'm trying to automate Word XP from Access XP with the following function. The sqlstmt argument is "Select * from where ". I understand that Microsoft Word mailmerge changed its default data...
2
by: Shannon Rotz | last post by:
I have a function in a Microsoft Access module (below) which creates a Word XP Mailmerge document, drawing the data from Access XP. I can get the connection to work fine. However, when I create...
2
by: Ray Todd Jr | last post by:
Could someone please look at this code and tell me what I am missing, please? The problem that is occuring is I am given an error (5922) that states "Word was unable to open the data source" As...
4
by: Ray Todd Jr | last post by:
I can't get ths code to correctly execute. After I have clicked on a Access Form, I want the code to open the word document, merge the data, print the forms and then close the two windows that...
4
by: pmhaupt2 | last post by:
I developed an Access 2003 program that will allow the user to produce a group of Word letters that merge with data records from an Access database. I created a mail merge Word document and...
0
by: Anne Richmond | last post by:
I have a Word(2000) mailmerge routine (code below) which works OK but always names the merged document "Forml Letters1". How do I change this to something else? Also how do I automatically save...
0
by: Bob Smith | last post by:
I have existing word documents that we need to have the data document reflect whether we're running in development, test or production. The data header is longer than 255 characters, so I cannot...
0
by: mbbostwick | last post by:
I have a problem with a mail merge procedure I used to use with Access '97. We recently converted to Office XP (2002) and I now have an issue I am unfamilliar with and have been unable to...
0
by: bobh | last post by:
Hi All, I have this older code(see below) that I used for a mailmerge in another application, I'm looking to do something similar but a little different in that, this time I have a single record...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.