473,654 Members | 3,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Mailmerge from MDE not working

I have a mailmerge that works fine from an MDB database using the
OpenDataSource method to send its data from a query within Access as part of
an automation sequence. Now, if I compile that mdb into an MDE, when I
click a button on the Access form that should produce the mailmerge, the
template opens on the screen with the fields visible, then an error message.

"File in use. <Filename> is locked for editing by 'another user'."

I then have to shut the Word document down and when I return to the Access
App form, the Microsoft Access Error "Word is unable to open the data
source." is visible. I have previously run mailmerges by the
DoCmd.TransferT ext method and had the mail merge main document find the
small textfile produced with the data in it, but I want to use this
OpendDataSource method to send out the name of the query in Access where the
merge data is to be found.

The query works fine. What seems to be stopping it from working is that it
sees the MDE as being locked for editing by another user (but it is OK if it
is an MDB) There must be something I am missing here and I can't believe it
hasn't happened to others.

If you have run into this before could you please explain why this is
occurring?
Nov 13 '05 #1
5 2382
I reckon the best way forward to debug this is to see whether you can create
a mail merge against the MDE file "by hand" ie. from within Word itself
interactively, both with the MDE opened and with it not opened.
This will enable you to test your assumption of whether the opened MDE is
somehow locking you out of the data.
Once you can do it by hand, then you should be able to do the same thing
using automation.

Ian.

"Dixie" <di***@dogmail. com> wrote in message
news:43******** @duster.adelaid e.on.net...
I have a mailmerge that works fine from an MDB database using the
OpenDataSour ce method to send its data from a query within Access as part
of an automation sequence. Now, if I compile that mdb into an MDE, when I
click a button on the Access form that should produce the mailmerge, the
template opens on the screen with the fields visible, then an error
message.

"File in use. <Filename> is locked for editing by 'another user'."

I then have to shut the Word document down and when I return to the Access
App form, the Microsoft Access Error "Word is unable to open the data
source." is visible. I have previously run mailmerges by the
DoCmd.TransferT ext method and had the mail merge main document find the
small textfile produced with the data in it, but I want to use this
OpendDataSource method to send out the name of the query in Access where
the merge data is to be found.

The query works fine. What seems to be stopping it from working is that
it sees the MDE as being locked for editing by another user (but it is OK
if it is an MDB) There must be something I am missing here and I can't
believe it hasn't happened to others.

If you have run into this before could you please explain why this is
occurring?

Nov 13 '05 #2
I tried this Ian and when I try to nominate the database that I want the
data link with, and then choose MS Acess Database (*.mdb; *.mde), I get an
error that says "Word cannot re-establish a DDE connection to Microsoft
Access to complete the current task." I have done an extensive internet
search on this and have not turned up anything helpful at this stage.

dixie

"Ian Hinson" <pp******@bigpo nd.net.au> wrote in message
news:pT******** **********@news-server.bigpond. net.au...
I reckon the best way forward to debug this is to see whether you can
create a mail merge against the MDE file "by hand" ie. from within Word
itself interactively, both with the MDE opened and with it not opened.
This will enable you to test your assumption of whether the opened MDE is
somehow locking you out of the data.
Once you can do it by hand, then you should be able to do the same thing
using automation.

Ian.

"Dixie" <di***@dogmail. com> wrote in message
news:43******** @duster.adelaid e.on.net...
I have a mailmerge that works fine from an MDB database using the
OpenDataSourc e method to send its data from a query within Access as part
of an automation sequence. Now, if I compile that mdb into an MDE, when I
click a button on the Access form that should produce the mailmerge, the
template opens on the screen with the fields visible, then an error
message.

"File in use. <Filename> is locked for editing by 'another user'."

I then have to shut the Word document down and when I return to the
Access App form, the Microsoft Access Error "Word is unable to open the
data source." is visible. I have previously run mailmerges by the
DoCmd.TransferT ext method and had the mail merge main document find the
small textfile produced with the data in it, but I want to use this
OpendDataSource method to send out the name of the query in Access where
the merge data is to be found.

The query works fine. What seems to be stopping it from working is that
it sees the MDE as being locked for editing by another user (but it is OK
if it is an MDB) There must be something I am missing here and I can't
believe it hasn't happened to others.

If you have run into this before could you please explain why this is
occurring?


Nov 13 '05 #3
See if this can help:
http://support.microsoft.com/default...b;EN-US;291445

"Dixie" <di***@dogmail. com> wrote in message
news:43******@d uster.adelaide. on.net...
I tried this Ian and when I try to nominate the database that I want the
data link with, and then choose MS Acess Database (*.mdb; *.mde), I get an
error that says "Word cannot re-establish a DDE connection to Microsoft
Access to complete the current task." I have done an extensive internet
search on this and have not turned up anything helpful at this stage.

dixie

"Ian Hinson" <pp******@bigpo nd.net.au> wrote in message
news:pT******** **********@news-server.bigpond. net.au...
I reckon the best way forward to debug this is to see whether you can
create a mail merge against the MDE file "by hand" ie. from within Word
itself interactively, both with the MDE opened and with it not opened.
This will enable you to test your assumption of whether the opened MDE is
somehow locking you out of the data.
Once you can do it by hand, then you should be able to do the same thing
using automation.

Ian.

"Dixie" <di***@dogmail. com> wrote in message
news:43******** @duster.adelaid e.on.net...
I have a mailmerge that works fine from an MDB database using the
OpenDataSour ce method to send its data from a query within Access as part
of an automation sequence. Now, if I compile that mdb into an MDE, when
I click a button on the Access form that should produce the mailmerge,
the template opens on the screen with the fields visible, then an error
message.

"File in use. <Filename> is locked for editing by 'another user'."

I then have to shut the Word document down and when I return to the
Access App form, the Microsoft Access Error "Word is unable to open the
data source." is visible. I have previously run mailmerges by the
DoCmd.TransferT ext method and had the mail merge main document find the
small textfile produced with the data in it, but I want to use this
OpendDataSource method to send out the name of the query in Access where
the merge data is to be found.

The query works fine. What seems to be stopping it from working is that
it sees the MDE as being locked for editing by another user (but it is
OK if it is an MDB) There must be something I am missing here and I
can't believe it hasn't happened to others.

If you have run into this before could you please explain why this is
occurring?



Nov 13 '05 #4
http://support.microsoft.com/default...&Product=offxp

"Ian Hinson" <pp******@bigpo nd.net.au> wrote in message
news:MT******** **********@news-server.bigpond. net.au...
See if this can help:
http://support.microsoft.com/default...b;EN-US;291445

"Dixie" <di***@dogmail. com> wrote in message
news:43******@d uster.adelaide. on.net...
I tried this Ian and when I try to nominate the database that I want the
data link with, and then choose MS Acess Database (*.mdb; *.mde), I get an
error that says "Word cannot re-establish a DDE connection to Microsoft
Access to complete the current task." I have done an extensive internet
search on this and have not turned up anything helpful at this stage.

dixie

"Ian Hinson" <pp******@bigpo nd.net.au> wrote in message
news:pT******** **********@news-server.bigpond. net.au...
I reckon the best way forward to debug this is to see whether you can
create a mail merge against the MDE file "by hand" ie. from within Word
itself interactively, both with the MDE opened and with it not opened.
This will enable you to test your assumption of whether the opened MDE
is somehow locking you out of the data.
Once you can do it by hand, then you should be able to do the same thing
using automation.

Ian.

"Dixie" <di***@dogmail. com> wrote in message
news:43******** @duster.adelaid e.on.net...
I have a mailmerge that works fine from an MDB database using the
OpenDataSou rce method to send its data from a query within Access as
part of an automation sequence. Now, if I compile that mdb into an MDE,
when I click a button on the Access form that should produce the
mailmerge , the template opens on the screen with the fields visible,
then an error message.

"File in use. <Filename> is locked for editing by 'another user'."

I then have to shut the Word document down and when I return to the
Access App form, the Microsoft Access Error "Word is unable to open the
data source." is visible. I have previously run mailmerges by the
DoCmd.TransferT ext method and had the mail merge main document find the
small textfile produced with the data in it, but I want to use this
OpendDataSource method to send out the name of the query in Access
where the merge data is to be found.

The query works fine. What seems to be stopping it from working is
that it sees the MDE as being locked for editing by another user (but
it is OK if it is an MDB) There must be something I am missing here
and I can't believe it hasn't happened to others.

If you have run into this before could you please explain why this is
occurring?



Nov 13 '05 #5
Found both of these in my research Ian. None of them seemed relevant to my
circumstances. I think I'll just go back to my original method of
mailmerge, but it is a pain.

Thanks for your help.
dixie

"Ian Hinson" <pp******@bigpo nd.net.au> wrote in message
news:GU******** **********@news-server.bigpond. net.au...
http://support.microsoft.com/default...&Product=offxp

"Ian Hinson" <pp******@bigpo nd.net.au> wrote in message
news:MT******** **********@news-server.bigpond. net.au...
See if this can help:
http://support.microsoft.com/default...b;EN-US;291445

"Dixie" <di***@dogmail. com> wrote in message
news:43******@d uster.adelaide. on.net...
I tried this Ian and when I try to nominate the database that I want the
data link with, and then choose MS Acess Database (*.mdb; *.mde), I get
an error that says "Word cannot re-establish a DDE connection to
Microsoft Access to complete the current task." I have done an extensive
internet search on this and have not turned up anything helpful at this
stage.

dixie

"Ian Hinson" <pp******@bigpo nd.net.au> wrote in message
news:pT******** **********@news-server.bigpond. net.au...
I reckon the best way forward to debug this is to see whether you can
create a mail merge against the MDE file "by hand" ie. from within Word
itself interactively, both with the MDE opened and with it not opened.
This will enable you to test your assumption of whether the opened MDE
is somehow locking you out of the data.
Once you can do it by hand, then you should be able to do the same
thing using automation.

Ian.

"Dixie" <di***@dogmail. com> wrote in message
news:43******** @duster.adelaid e.on.net...
>I have a mailmerge that works fine from an MDB database using the
>OpenDataSo urce method to send its data from a query within Access as
>part of an automation sequence. Now, if I compile that mdb into an
>MDE, when I click a button on the Access form that should produce the
>mailmerg e, the template opens on the screen with the fields visible,
>then an error message.
>
> "File in use. <Filename> is locked for editing by 'another user'."
>
> I then have to shut the Word document down and when I return to the
> Access App form, the Microsoft Access Error "Word is unable to open
> the data source." is visible. I have previously run mailmerges by the
> DoCmd.TransferT ext method and had the mail merge main document find
> the small textfile produced with the data in it, but I want to use
> this OpendDataSource method to send out the name of the query in
> Access where the merge data is to be found.
>
> The query works fine. What seems to be stopping it from working is
> that it sees the MDE as being locked for editing by another user (but
> it is OK if it is an MDB) There must be something I am missing here
> and I can't believe it hasn't happened to others.
>
> If you have run into this before could you please explain why this is
> occurring?
>
>



Nov 13 '05 #6

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

Similar topics

0
1270
by: SmartHead | last post by:
Hi, I would like to open aword document and insert mailmerge fields dinamically using c#.net. While working around it, I created a MailMerge object and used its "Field" property. But its actually shows me final data from the attched datsource file. I don't want this but it should just display the actual field object there. For example: If I select <<First Name>> field then I want to see the << First Name >> on the document not the name...
0
1290
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 segment below, we had rec'd the : "Opening this will run the following SQL Command" message. We were able to suppress that message with registry changes and code contained in MSKB 82765.
2
1912
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 the form letters, the data from certain merge fields is missing. When I view the data in the MailMerge Recipients dialog box, the data is not there either - the columns are there, but the records have blanks where the data in those columns should...
4
12047
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 open of Word. The Mail Merge takes place, and the sticking point is that I have to manually close the two Word Windows. Can someone please tell me what I'm not doing correctly. Below is the code I am using...
0
1078
by: RH | last post by:
Hi, I'm trying to use mailmerge with Word2003 from an asp.net webpage I'm using the following code: Dim W As New Word.Application Dim D As Word.Document = W.Documents.Open("maindoc.doc") D.MailMerge.OpenDataSource("address.txt") D.MailMerge.Destination = Word.WdMailMergeDestination.wdSendToNewDocument D.MailMerge.Execute()
2
13503
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to execute a MailMerge to create mailing labels or customized letters. A label name known to MS Word MailMerge mailing label wizard may be used or a template file containing the field names Line1 thru Line5 for each record to be printed. If a...
0
1397
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 the merged document to a specific destination? Dim wrdApp As Word.Application Dim wrdDoc As Word._Document
0
1606
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 put the structure in either createdatasource or opendatasource so I have to build it on the fly. The code I have written is as follows:
0
1283
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 to merge and after the merge to the document I want to store it on a particular server in a particular folder with a particular file name and I don't know what the coding would be for that. I assume it would go in place of the...
0
8290
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8707
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8482
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7306
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4149
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2714
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1593
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.