473,761 Members | 3,651 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strange Automation Issue

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.Applicatio n
Set objWord = New Word.Applicatio n
objWord.Documen ts.Open FileName:=strFi lename, _
ConfirmConversi ons:=False, _
ReadOnly:=False , _
AddToRecentFile s:=False, _
Revert:=False, _
Format:=gcon_wd OpenFormatAuto '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
Nov 12 '05
25 3736
> Again, this is the same code that's running
fine on other machines.


Neil,

Starting from the above premise, if the code runs fine
on other machines, then it seems the problem is not
with the code, but with the user or the machine.

User: Does the user only have read-only rights to
the folder in which the Word document is stored?

(Presumably the file is not read-only if other users
are OK.)

Machine:
* Is the network connection OK?
* Is the software on this machine up-to-date?
* Is the right software being used?

(Don't you just love users who set up shortcuts?
Who'd have thought of that one?)

Waiting with bated breath for your patience to
snap so we get to see the unprintable comments!

Regards
Geoff

PS I don't get the early/late-binding issue if
references were set correctly.

Nov 12 '05 #21
I agree that it seems to be the machine. The app appears to have no problems
on any other machine, and, now that the other issue (where the user was
opening an old version of Word) is resolved, I'm chalking this last issue up
to the machine, and stepping away from it for a while. The machine that's
having problems is only used as a dial-up portal for us PCAnywhere users, so
it's not a biggie. So, for now, I'm letting it drop. If I ever get this
resolved, I'll be sure to post it here.

Thanks everyone for your help!

(Sorry about not having any unprintable comments to print! :-) )

Neil
"Geoff" <ge***@nospam.f or.me.com> wrote in message
news:bo******** **@news8.svr.po l.co.uk...
Again, this is the same code that's running
fine on other machines.


Neil,

Starting from the above premise, if the code runs fine
on other machines, then it seems the problem is not
with the code, but with the user or the machine.

User: Does the user only have read-only rights to
the folder in which the Word document is stored?

(Presumably the file is not read-only if other users
are OK.)

Machine:
* Is the network connection OK?
* Is the software on this machine up-to-date?
* Is the right software being used?

(Don't you just love users who set up shortcuts?
Who'd have thought of that one?)

Waiting with bated breath for your patience to
snap so we get to see the unprintable comments!

Regards
Geoff

PS I don't get the early/late-binding issue if
references were set correctly.

Nov 12 '05 #22

"Tom Wickerath" <AOS168 AT Comcast DOT com> wrote in message
news:Hn******** @news.boeing.co m...
Did you work as an "indexer" as your first job? <smile>
Actually, I was a tech writer for a few years and had to do my own indexes.
As much as I'd want the indexes to be perfect, there were always flaws in
them, and it was always a tedious job that I couldn't wait to be finished
with. So I have sympathy for indexers and have come to not expect much from
indexes (or, at least, I'm willing to see the human element in the index).
Also, have you been able to rule out the possibility of incorrect OLE Automation system files? I was thinking that perhaps this particular PC does not have the Windows XP operating system, but it had some other software installed, which may have installed an incorrect version of the OLE Automation files intended for Windows XP. That scenerio may have led to the automation error you reported for your application....
That could be. It seems clearly to be something with the machine, and that
seems a likely explanation.

Neil


_______________ _______________ _______

"Neil Ginsberg" <nr*@nrgconsult .com> wrote in message
news:D3******** *********@newsr ead3.news.pas.e arthlink.net...
and I would have thought that Access 2002 is a part of Office XP, and that Access 2003 is a part of Office 2003.


Remember: indexers are just poor slobs who have stared at too many
characters over too many cups of coffee for too many hours.

Neil

Nov 12 '05 #23
I should add that there are "profession al indexers" who do nothing but that.
So, apparently, they're not all poor overworked slobs. Some actually thrive
in that field. I just recall how I felt when I did my indexes........ .

:-)

Neil

"Tom Wickerath" <AOS168 AT Comcast DOT com> wrote in message
news:Hn******** @news.boeing.co m...
Did you work as an "indexer" as your first job? <smile>

Nov 12 '05 #24
I know you indicated in another post (11/3/03, 11:25 PM) that:

"So, for now, I'm letting it drop. If I ever get this
resolved, I'll be sure to post it here".

But, I'm still curious if the OLE Automation system files might be the issue. Can you
search for the file named "Oleaut32.d ll" on the PC that is still having the problem, and
report back which version that it is? Also, which operating system does this machine
have?

Ref.: http://support.microsoft.com/default...b;en-us;320108

_______________ _______________ _______________

"Neil Ginsberg" <nr*@nrgconsult .com> wrote in message
news:Jx******** *********@newsr ead4.news.pas.e arthlink.net...
That could be. It seems clearly to be something with the machine, and that
seems a likely explanation.

Neil
_______________ _______________ _______________

Also, have you been able to rule out the possibility of incorrect OLE Automation system
files? I was thinking that perhaps this particular PC does not have the Windows XP
operating system, but it had some other software installed, which may have installed an
incorrect version of the OLE Automation files intended for Windows XP. That scenario may
have led to the automation error you reported for your application....
Nov 12 '05 #25
> But, I'm still curious if the OLE Automation system files might be the
issue. Can you
search for the file named "Oleaut32.d ll" on the PC that is still having the problem, and report back which version that it is? Also, which operating system does this machine have?


The machine is running Win 98 SE, and the version of Oleaut32 is
3.50.5016.0. However, after posting my message last night I realized that it
has to be something else. Recall that there was "App A" (original) and "App
B" (pared-down copy), and that App A works on that machine, whereas App B
doesn't. I did determine while responding to TC that App B used late
binding, so I changed it to match App A's early-binding code. After that,
the problem shifted a bit so that it does open the Word doc (previously
didn't), though it first tells me that it's locked by me; but then fails
when setting Word to visible (and Word was already visible).

So the bottom line is that App B is having problems (albeit different ones
than originally) whereas App A isn't, and they both have the same code and
references, from what I can see. So this doesn't make sense. But, if there's
any consolation, it would be that App B apparently works fine on all other
machines. So go figure......

If you want me to look at anything else, let me know.

Neil
Nov 12 '05 #26

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

Similar topics

1
2529
by: a_bogdan_marinescu | last post by:
Hello all, I'm trying to do some COM automation from Python (using Mark Hammond's Win32 extensions, of course) and I'm getting some very strange errors. Specifically, I try to use a COM object that supports events, and I'm instantiating it like this: eventobj = win32com.client.DispatchWithEvents( crtthread, DebuggerThreadEvents )
15
5846
by: qwweeeit | last post by:
Hi all, Elliot Temple on the 1 June wrote: > How do I make Python press a button on a webpage? I looked at > urllib, but I only see how to open a URL with that. I searched > google but no luck. > For example, google has a button <input type=submit value="Google > Search" name=btnG> how would i make a script to press that button? I have a similar target: web automation, which
0
1264
by: Matt | last post by:
Hello, I am having an issue when I try to automate Access. When working in the automated application, it seems that all warning messages have been disabled and error handling in reports doesn't work. For example, when I go to delete an object such as a form or report, I get no confirmation of any kind...it either works or it doesn't (doesn't work if I have the report open).
2
1835
by: Alex Maghen | last post by:
Hi. I've seen several KBs on using .NET for MS Office Automation. But I have a particular question: I am developing a somewhat stand-alone .ASPX page which will need to do some relatively simple MS Office Automation (Office 2003+). The .ASPX page is not part of a Web Forms Visual Studio project. It's just a stand-alone file. And therefore, there is not "References" setting or anything because there's no Visual Studio project. My...
4
1141
by: Arturo | last post by:
Hello everybody. Can someone have a look at this bit of code? Private Sub TestExcel() 'Create the Excel Application Dim xlExcel As Application = New Excel.Application xlExcel.DisplayAlerts = False Dim xlWorkbooks As Workbooks = xlExcel.Workbooks Try
2
1269
by: RJB | last post by:
I'm working on a VB application that must run 24x7 for a LONG time, think 60 days of so. As part of what it does it must automate an instance of IE and navigate to many different URLs, think many thousands. Issue 1: Most of the time, these navigations succeed. All is well. But, based on early runs, from time to time, say once or twice every 24 hrs IE inexplicably hangs and the automation object hangs, gets stuck, becomes...
3
1280
by: Richard Bell | last post by:
I'm working on a VB application that must run 24x7 for a LONG time, think 60 days of so. As part of what it does it must automate an instance of IE and navigate to many different URLs, think many thousands. Issue 1: Most of the time, these navigations succeed. All is well. But, based on early runs, from time to time, say once or twice every 24 hrs IE inexplicably hangs and the automation object hangs, gets stuck, becomes...
16
2979
by: RichardP | last post by:
Hi there everyone - I'm new to this forum. I am having an issue when running an application from an instance of Access which has been started through automation (early or late bound, makes no difference). No warning / confirmation messages are issued (eg. when running action queries, deleting records from a datasheet, deleting database objects such as tables).
10
3285
by: cj2 | last post by:
I open a word template in VB and add values to the bookmarks then save the document as as pdf. When I then go to close the document it pops up a save as dialog box. It's already saved the document in pdf and that is all I want done with it. How can I tell it to close the file without prompting me for anything? For Each row As DataRow In myDt.Rows Dim objWord As Application Dim objDoc As Document objWord =...
0
9336
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
10111
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9948
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
9902
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
8770
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...
1
7327
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5364
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3446
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2738
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.