Re: DDE Access to Word using mde
- From: Beth <Beth@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 21 May 2007 09:46:01 -0700
I have all three(2000,2002,2003) versions of Access and Word.
I am opening Word from an Access procedure as follows:
Set WordDoc = GetObject(WordFileSpec, "Word.Document")
strConnect = "TABLE " & merge_qry
strSql = ""
If (WordDoc.Application.Version > 9#) Then
strSql = "SELECT * FROM [" & merge_qry & "]"
End If
WordDoc.MailMerge.OpenDataSource _
Name:=Datafile, _
ReadOnly:=True, LinkToSource:=True, _
Connection:=strConnect, _
SQLStatement:=strSql
where Datafile is the database name and merge_qry is the table name.
What I found is this:
With Access running as mdb, this works for all combinations.
With Access running as mde:
It works fine with any version of Access and Word 2002.
It works fine with any version of Access and Word 2003 but I currently have
some problem with my installation. I keep getting the old "Encountered a
problem and has to close" message for the 2nd instance of Access that Word
opens. but Word opens just fine.
It does not work with any version of Access and Word 2000. I get the message
originally noted.
What is the OLE DB method that you mentioned? Does it handle memos?
Thanks,
Beth
"Peter Jamieson" wrote:
Here, in the simple case where you have a Word 2003 document and you connect.
to an Access 2002/3 .mde using DDE, the connection is fine. Assuming you are
actually launching a mailmerge from Access,
a. how exactly are you doing that?
b. can you try the simpler case and see if that works?
c. which versions of Word and Access are you using? (It sounds like 2000
(which I can't test right now), but if it's 2002/2003 have you tried the OLE
DB connection method as well?)
Peter Jamieson
"Beth" <Beth@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A5F1E39F-83DC-4CEB-8A7E-999F8E240D6B@xxxxxxxxxxxxxxxx
I would like to give my clients mde files instead of the open source mdb.
However, I need to export reports(mailmerge) to Word and this doesn't seem
to
work with DDE connection. It gives error message "....mde is locked for
editing by another user. Click 'Notify' to open a read-only copy of the
document...." Clicking notify doesn't work either. it hangs and I have to
kill Word throught the task manager.
connecting with ODBC works great! However, ODBC doesn't handle memos and
dates.
By the way there are no other users(except the current opening of the
file)
and this has nothing to do with opening shared or exclusive in the options
menu.
DDE works with mdb but not with mde.
Any suggestions?
Thank you,
Beth
- Follow-Ups:
- Re: DDE Access to Word using mde
- From: Peter Jamieson
- Re: DDE Access to Word using mde
- References:
- Re: DDE Access to Word using mde
- From: Peter Jamieson
- Re: DDE Access to Word using mde
- Prev by Date: Re: How do I tell Word 2003 my mail-merge text is NOT UTF-8?
- Next by Date: Re: Email INCLUDEPICTURE MERGEFIELD Pictures Not Changing
- Previous by thread: Re: DDE Access to Word using mde
- Next by thread: Re: DDE Access to Word using mde
- Index(es):
Relevant Pages
|