473,326 Members | 2,128 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,326 software developers and data experts.

Problem with Microsoft Word Mailmerge in VB.NET Program

Hope someone can shed some light on a tricky error.

I am trying to automate a mailmerge in VB.NET using Word 2003. The main document is a previously existing Word file. The data source is a text file created by a separate Oracle SQL program. The main document is linked to the data source; if you open the main doc manually, you get the SQL security message for the name of the text file.

When the program runs the OpenDataSource command for the text file, the “file is locked for editing” dialog box pops up to request the desired course of action. Once the user makes a choice, the merge completes. Unfortunately, this prevents the merge from running automatically.

One comment in a Web post says that when a main document is opened through Automation, the data source is not attached to it. However, it looks like the command to open the main document causes the data source document to be locked as if it had been opened. A check of Task Manager does not show the data source open as a separate process.

It would be greatly appreciated if someone can tell me how to work around this problem or supply an example of mailmerge code using a text file as the data source. Thanks.
Sep 3 '08 #1
0 1279

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Allcomp | last post by:
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...
2
by: Bud Zielinski | last post by:
Some of our users have converted to Office 2003. Our Access app is in 2000. they run it in Access 2003 with Access 2000 as the default file format. When doing a merge from the partial code...
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: 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: 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...
3
prn
by: prn | last post by:
Hi folks, I'm trying to create letters based on an Access database. I'm using Access 2003 and Word 2003. Most of the data tables are actually on a SQL server and Access is the front end for them....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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...

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.