dbTalk Databases Forums  

Strange Automation Issue

comp.database.ms-access comp.database.ms-access


Discuss Strange Automation Issue in the comp.database.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Neil Ginsberg
 
Posts: n/a

Default Strange Automation Issue - 10-29-2003 , 03:42 PM






I have a strange situation with my Access 2000 database. I have code in the
database which has worked fine for years, and now all of a sudden doesn't
work fine on one or two of my client's machines. The code opens MS Word
through Automation and then opens a particular Word doc. It's still working
fine on most machines; but on one or two of them, the user is getting an
Automation Error. The code used is as follows:

Dim objWord As Word.Application
Set objWord = New Word.Application
objWord.Documents.Open FileName:=strFilename, _
ConfirmConversions:=False, _
ReadOnly:=False, _
AddToRecentFiles:=False, _
Revert:=False, _
Format:=gcon_wdOpenFormatAuto 'this is global constant with
Word constant value

The Automation Error occurs on the third line, when trying to open the
document (the document does exist, so that's not the problem).

Even stranger than the fact that the problem's only happening on two out of
several dozen machines, is the following. I have a pared-down copy of the
database, that users use to take on the road with them and show to clients.
The pared-down version (call it "App B") was taken from the original (call
it "App A") with some functionality removed. Regarding the above code that's
failing, both App A and App B are identical, and both have the same
references.

Now, here's the really strange part.

On one computer that's having problems, App A fails in the above code. On
the other computer that's having problems, App A works fine in the above
code, but App B fails in that code. So, in the second case, with the same
computer and two identical sets of code, one set fails, the other doesn't.

I've looked at backup copies to see if it was a corruption issue, and
haven't seen any difference. And, as noted, this code has been in place for
years without problems, until just the other day when these problems started
happening.

All of the users have MS Office and the database application installed on
their C drives.

Any assistance would be appreciated.

Thanks!

Neil



Reply With Quote
  #2  
Old   
John
 
Posts: n/a

Default Re: Strange Automation Issue - 11-06-2003 , 08:04 PM






Hi Neil,

It certainly sounds strange. If the failure is consistent then i would
look at the machines in question for the resolution. perhaps something
is amiss in the registry in terms of some required control that is not
registered properly, perhaps they have some virii or a few too many
competing spyware apps that are creating timing issues. I would grab
one of those offending laptops, or machines and make sure the OS is as
clean as possible, perhaps re-install office, and then tinker with
your app on that machine to see whats going on.

regards,

john
jobrien at acscience dot com

"Neil Ginsberg" <nrg (AT) nrgconsult (DOT) com> wrote

Quote:
I have a strange situation with my Access 2000 database. I have code in the
database which has worked fine for years, and now all of a sudden doesn't
work fine on one or two of my client's machines. The code opens MS Word
through Automation and then opens a particular Word doc. It's still working
fine on most machines; but on one or two of them, the user is getting an
Automation Error. The code used is as follows:

Dim objWord As Word.Application
Set objWord = New Word.Application
objWord.Documents.Open FileName:=strFilename, _
ConfirmConversions:=False, _
ReadOnly:=False, _
AddToRecentFiles:=False, _
Revert:=False, _
Format:=gcon_wdOpenFormatAuto 'this is global constant with
Word constant value

The Automation Error occurs on the third line, when trying to open the
document (the document does exist, so that's not the problem).

Even stranger than the fact that the problem's only happening on two out of
several dozen machines, is the following. I have a pared-down copy of the
database, that users use to take on the road with them and show to clients.
The pared-down version (call it "App B") was taken from the original (call
it "App A") with some functionality removed. Regarding the above code that's
failing, both App A and App B are identical, and both have the same
references.

Now, here's the really strange part.

On one computer that's having problems, App A fails in the above code. On
the other computer that's having problems, App A works fine in the above
code, but App B fails in that code. So, in the second case, with the same
computer and two identical sets of code, one set fails, the other doesn't.

I've looked at backup copies to see if it was a corruption issue, and
haven't seen any difference. And, as noted, this code has been in place for
years without problems, until just the other day when these problems started
happening.

All of the users have MS Office and the database application installed on
their C drives.

Any assistance would be appreciated.

Thanks!

Neil

Reply With Quote
  #3  
Old   
Hunter
 
Posts: n/a

Default Re: Strange Automation Issue - 11-15-2003 , 04:05 PM



Hi Neal,

One way an automation issue can be resolved is by copying the object
in question, such as a Form and pasting it back again. There may need
to be some renaming to get code right. I rename my frmForm to
frmForm-Original and then name the copy as frmForm so the works right.
My code worked all along but then somehow an automation error came
up, but the copy and paste solution worked. Hope your problem gets
resolved.

Hunter

Quote:
"Neil Ginsberg" <nrg (AT) nrgconsult (DOT) com> wrote

I have a strange situation with my Access 2000 database. I have code in the
database which has worked fine for years, and now all of a sudden doesn't
work fine on one or two of my client's machines. The code opens MS Word
through Automation and then opens a particular Word doc. It's still working
fine on most machines; but on one or two of them, the user is getting an
Automation Error. The code used is as follows:

Dim objWord As Word.Application
Set objWord = New Word.Application
objWord.Documents.Open FileName:=strFilename, _
ConfirmConversions:=False, _
ReadOnly:=False, _
AddToRecentFiles:=False, _
Revert:=False, _
Format:=gcon_wdOpenFormatAuto 'this is global constant with
Word constant value

The Automation Error occurs on the third line, when trying to open the
document (the document does exist, so that's not the problem).

Even stranger than the fact that the problem's only happening on two out of
several dozen machines, is the following. I have a pared-down copy of the
database, that users use to take on the road with them and show to clients.
The pared-down version (call it "App B") was taken from the original (call
it "App A") with some functionality removed. Regarding the above code that's
failing, both App A and App B are identical, and both have the same
references.

Now, here's the really strange part.

On one computer that's having problems, App A fails in the above code. On
the other computer that's having problems, App A works fine in the above
code, but App B fails in that code. So, in the second case, with the same
computer and two identical sets of code, one set fails, the other doesn't.

I've looked at backup copies to see if it was a corruption issue, and
haven't seen any difference. And, as noted, this code has been in place for
years without problems, until just the other day when these problems started
happening.

All of the users have MS Office and the database application installed on
their C drives.

Any assistance would be appreciated.

Thanks!

Neil

Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.