PC Review


Reply
Thread Tools Rate Thread

Automation Error - The server threw an exception

 
 
lmr lmr is offline
New Member
Join Date: Nov 2009
Posts: 1
 
      16th Nov 2009
Hi all,

A client of mine asked me to update an MS Access file.

The file is in Access 2000 format, they use Access 2002, but I used Access 2003 to perform the required modifications.

After I finished my work (everything works fine in my workstation) I tried to run in the client workstation. Everything does its job except one small part that was one of the few things that I didn't change. The ideia of that part is to generate a Word mailmerge operation and one of the steps is to use MS Word to open a txt file and save it as a doc. The code (that rests intact) is the following:

DoCmd.TransferText acExportMerge, , qry, fileName & ".txt"
On Error Resume Next
Kill fileName & ".doc"
On Error GoTo Err_ExportaDoc

' wd is declared as a Word.Application object and doc is declared as a Word.Document object
Set doc = wd.Documents.Open(fileName & ".txt", False, , , , , , , , wdOpenFormatText)
doc.SaveAs fich & ".doc", wdFormatDocument
doc.Close


The error occurs when the code hits "Open" and the error message is:

Automation Error - The server threw an exception

When I run this code using the old version it works fine, if I run it on my workstation (Access 2003 and Win XP Home edition) it is also OK, but if I run it on client's workstation (Access 2002, Win XP Professional) it throws me that error.

I runed it several times in debug mode and the wd object is always well created and it is the same object as used in the old version (that works fine). Besides that I cheked VBA references and all are exactly the same as the file version that works. I think that this should be a configuration problem but I still can not find it...

Can anyone help me on that? I spent almost one week searching for the solution and I'm still lost...

Thanks in advance.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Server Threw An Exception Error Maurice Microsoft Excel Programming 0 13th Jan 2009 11:39 PM
Automation Error--Server Threw Exception Peter L Reader Microsoft Access VBA Modules 1 24th Aug 2005 04:04 PM
Server threw an exception error message =?Utf-8?B?Qi5CYWlsZXk=?= Windows XP Help 4 29th Oct 2004 10:25 AM
Server threw an exception error message. =?Utf-8?B?Qi5CYWlsZXk=?= Windows XP General 2 17th Oct 2004 11:43 PM
Error: The server threw an exception Tracey Kellicutt Windows XP Internet Explorer 1 26th Jun 2004 03:04 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:44 PM.