Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CreateObject Problem (Word XP)

Status
Not open for further replies.

GriffMG

Programmer
Mar 4, 2002
6,288
1
38
FR
I've put together an application using automation to do a simple find and replace in MS Word from VFP 6.

It works most of the time very well using:

Code:
oWordObj  = CreateObject("Word.Application")

To create an instance of Word for automated template generation.

I have a problem on some XP machines, running Office XP as well, in that the 'CreateObject' fails. The machines aren't mine, they're some distance away, and Word is working fine otherwise on both of them.

Any ideas?


Regards

Griff
Keep [Smile]ing
 
Hi Mike,

I was concerned that people were only reading the 'Microsoft: VFP - General Coding Issues' forum!

Yes there is an error message - I will get the details tomorrow, the user was a bit short in their description today, all I got was the VFP line number! which lead me to
the 'CreateObject' problem.

I did try a little tweak, putting a delay in just before the create, something I picked up from the MS site somewhere... but the users time was too limited to get more.

Any ideas?

Regards

Griff
Keep [Smile]ing
 
GriffMG

Have the customer "print-screen" the error and paste into a word document and e-mail it to you.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
That's my plan Mike... relies on an element of goodwill - which is, fortunately, NOT is short supply!

Have a good evening one and all

Regards

Griff
Keep [Smile]ing
 
Does it work ok on older versions of Office? I use the same line of code as part of automated mailmerges in one of my apps. When I moved it onto an XP machine from Win98 (both using Office 97) I had to change bits of the Word automation due to subtle changes that M$ had introduced. unfortunately I haven't got experience of Office XP to know what's up. I'll check back when you've managed to get the info off your users.
 
Hi, I have two minor mods in the code which are activated dependant on the office version - if it's greater than 8, it runs one version, less than 8 it does something different.

At the moment, I'm not getting that far on the particular machine in question... can't even create the object.

That said, I'm off to ring the first one and get an e-mail!
(hopefully with the error message)

PS. In the research I've been doing, it COULD be related to a Norton Anti-Virus plug-in...

Thanks


Regards

Griff
Keep [Smile]ing
 
I have the error code:

Code:
Error No.: 1426
OLE error code 0x80070003 The system cannot find the path specified.



Regards

Griff
Keep [Smile]ing
 

I sounds like a bad Word installation. Nothing to do with VFP.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,

I think you are part the way there, not a specifically VFP problem.

I'm beginning to think it's got more to do with the end users workstation setup. The client is a Netware site, which is good, but also a heavy ZenWorks and Novell Application Launcher (NAL) zombies, which is probably what's killing me.

I think, they have their systems set up with these barmy 'virtual desktops' and NAL intercepts calls for applications (normally) and redirects the registry settings to whatever they have setup in NAL (i.e. perhaps getting the latest version from the LAN or whatever).

But, VFP via OLE is probably calling the reg setting - before NAL gets to it - and the application isn't there.

Funny thing is, they have the opposite problem most of the time - my applications set-up can't create a short-cut on the desktop, and for them we always end up talking them through it!

Long and short of it, I'm gonna have to visit the user and work out a way round this I think.

Any other thoughts anyone?

Regards

Griff
Keep [Smile]ing
 
I have an idea, if the new app is installed 'inside' NAL it might just work...

Thanks for everyones help.

Martin



Regards

Griff
Keep [Smile]ing
 
Update on this problem - not NAL at all!

The users machine has been set-up using a corporate 'image' which is out of date. This means that the OLE automation command is pointing to the wrong folder for the application.

I got the idea that this was the case from the MS website:


The important key is found by searching for :

{000209FF-0000-0000-C000-000000000046}

In the registry, and then testing the command in the run window...

Many thanks for all your thoughts.

Regards

Griff
Keep [Smile]ing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top