Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / July 2006

Tip: Looking for answers? Try searching our database.

Mail merge Word/Excel Dilaogue/Database Engine error

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
havenlad - 11 Jul 2006 11:24 GMT
A client is having major problems doing a mail-merge. Every time I try to
open the document I get an error message stating "this operation cannot be
completed because of dialog or database engine failures. please try later"

Anybody's help would do me a huge favour

Thanks

Chris
Peter Jamieson - 11 Jul 2006 14:12 GMT
Which version of Word?

Has this merge worked before?

Can you spell out what is going wrong, e.g. can you disconnect? Can you
reconnect? Does the problem occur when you connect/reconnect or only when
you open the document?

Is the Excel file being used by anything else?

(Do you have access to the client's machine?)

Peter Jamieson

>A client is having major problems doing a mail-merge. Every time I try to
> open the document I get an error message stating "this operation cannot be
[quoted text clipped - 5 lines]
>
> Chris
havenlad - 11 Jul 2006 15:18 GMT
Thanks Peter

Word 2003
Yes she can disconnect - that is the only workaround she has.
The merge has worked before, and it has failed before - it is intermittent.  
(it failed when she logged into my machine)
The problem is only when she opens the document
The |Excel file ihas never been moved and it is not in use elsewhere
I do have access to the machine.

Hope all that helps

> Which version of Word?
>
[quoted text clipped - 19 lines]
> >
> > Chris
Peter Jamieson - 11 Jul 2006 16:41 GMT
I don't know what the problem is, but if it's intermittent and only occurs
when the document is opened, I would try to go the macro route, i.e.
a. create an AutoOpen macro in the document, say

Sub AutoOpen()

Dim strPathName As String
Dim strSheetRangeName As String
Dim strQuery As String

' Put the pathname of your Excel workbook here
strpathName = "c:\myworkbooks\mywb.xls"

' Put the name of the Sheet (or the range name) here
strSheetRangeName = "Sheet1$"

' Construct the Query - you may also need WHERE and ORDER BY
' clauses for filtering and sorting

strQuery = _
 "SELECT * FROM `" & _
 strSheetRangeName & _
 "`"

' The following should be enough in Word 2003

 ActiveDocument.MailMerge.OpenDataSource _
   Name:=strPathName,  _
   SQLStatement:=strQuery

' Set the merge type you want
 ActiveDocument.MailMerge.MainDocumentType = wdFormLetters

' optionally set the destination you want
 ActiveDocument.MailMerge.Destination = wdSendToNewDocument

End Sub

b. ensure the data source is disconnected from the document (click the
first button in the Mail Merge toolbar and check the Normal Word Document
option)
c. save the document

When the user has finished with the document, she either needs to close the
mail merge main document without saving it, or do (b) then (c).

Unfortunately you will probably also have to take account of the following
KB article:

"Opening This Will Run the Following SQL Command" Message When You Open a
Word Document"
at
http://support.microsoft.com?kbid=825765

As for the cause of the existing problem, I can only offer a few ideas:
a. the Excel document might be corrupt
b. the Excel document might be very large (I don't run into that myself)
c. Is the Excel document on a network path?
d. is the Excel document path name long?
e. are sort/filter options specified? (but I think this only caused a
problem in Office XP)
f. is the user using a network roaming profile? If so, there is a
possibilty that there is a permissions problem with a temporary file/folder
somewhere.

Peter Jamieson
> Thanks Peter
>
[quoted text clipped - 35 lines]
>> >
>> > Chris
havenlad - 12 Jul 2006 13:08 GMT
Ah.  Way too deep for me - sorry i really don't understand anything in that
answer

> I don't know what the problem is, but if it's intermittent and only occurs
> when the document is opened, I would try to go the macro route, i.e.
[quoted text clipped - 101 lines]
> >> >
> >> > Chris
Peter Jamieson - 12 Jul 2006 14:03 GMT
> Ah.  Way too deep for me - sorry i really don't understand anything in
> that
> answer

I hoped you might at least understand stuff such as

>>  a. the Excel document might be corrupt
>>  b. the Excel document might be very large

and be able to set up some simple tests that might reveal problems in those
areas (e.g. experiment using a newly-created, small, definitely not corrupt
Excel file as the data source)
but let's look at this a different way.

At the moment, the user opens the document (is that just using Word
File|Open, or what?). Then she sometimes sees the error.

If she sees the error, she can disconnect, then reconnect, and it then works
(I think - is that correct?).

After that, has she saved the Mail Merge Main Document?  If not, can she do
that and see if that makes a difference (I don't see why it should, but it
is the first thing to try).

Finally, can you spell out what you meant by:

>> > (it failed when she logged into my machine)

?

Peter Jamieson
> Ah.  Way too deep for me - sorry i really don't understand anything in
> that
[quoted text clipped - 113 lines]
>> >> >
>> >> > Chris
havenlad - 12 Jul 2006 14:38 GMT
Thanks for your patience

I did understand those basic parts, but the Macro parts are way too deep.

There are a few spreadsheets they use for the mail merges.  The problem
occurs with several of them, not just one.  They vary in size.  I will ask
her to copy and paste the excel file to another location and copy and paste
it back to the original location and will ak they do this each time it
happens for a few days at least.

I will ask her to try the things suggested.

Spot on about the reconnect.

She logged into my machine with her account and tried the mail merge from
there.  The problem followed, which rules out a problem on her machine.  A
colleqgue then logged in on his machine and the same thing happened to him,
so it's not a machine or account problem

Hope this helps

> > Ah.  Way too deep for me - sorry i really don't understand anything in
> > that
[quoted text clipped - 144 lines]
> >> >> >
> >> >> > Chris
Peter Jamieson - 12 Jul 2006 17:54 GMT
> I did understand those basic parts, but the Macro parts are way too deep.

Understood.

Let's see how things go.

Peter Jamieson

> Thanks for your patience
>
[quoted text clipped - 180 lines]
>> >> >> >
>> >> >> > Chris
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.