Link to home
Start Free TrialLog in
Avatar of jag_dev
jag_dev

asked on

Required files to use the Word.Application object...

I have an application. Everything was fine until I decided to use Word as a reporting tool.

I heard that it was better not to reference the Microsoft Office 10.0 Object Library. So I use late binding, I have declared all variables as 'Object' in the following function example:

********************************
Public Function VersionWord() As String
Dim objW As Object

On Error GoTo erro

Set objW = CreateObject("Word.Application")
VersionWord = objW.Version
objW.Quit
Set objW = Nothing

Exit Function
erro:
VersionWord = ""
End Function
********************************

Well, this works fine on my computer.

But I have two problems:

PROBLEM 1. Error 329: Can´t Create ActiveX object.
I found this error on some computers without Ms Office.
The solution? Install Ms Office.
My question is: This isn´t suppose to happen right?? Because I'm not declaring the variables as Word.Application

Any suggestion on this problem?


PROBLEM 2.
Forms containing these objects won't load.
I have two forms.
Both of them include a custom control (*.ctl). This control.ctl contains some functions and stuff that uses the Word.Application object. (All variables declared 'as Object')
Installing Ms Office wasn't enough.

Solution I found? Installing Visual Studio 6.0

Any suggestion about this problem? Obviously the problem is that my setup program is lacking of some important files, because when I install VStudio 6.0 it all works fine.

Could you imagine how expensive would it be to ship a VS6.0 cd to every client??????????? :s

I'm using InstallShield Express 2.11 to pack the application. Would you suggest another program to repack?

Are there any dll's ocx's that I am missing to use the Word.Application object???

Is there any installation package from the microsoft website that I could send to all my clients.

Adding the Ms reporting tool got me into a lot of troubles, PLEASE HELP Me!!!

I need some advice, and I have been trying to solve this problem for about two months... (any tools to find out what is going on??)

Thanks in advance,
Ja


P.S. This problem has happened on my clients computers, so there is no way to stay there and solve the problem. and I have not been able to recreate the problem on my computers at home/work........................... so I have no place to experiment. :s :s :s :s :s


If you need more information... feel free to ask me. Thanks.
Avatar of Erick37
Erick37
Flag of United States of America image

This may help:

You receive run-time error 429 when you automate Office applications
http://support.microsoft.com/default.aspx?scid=kb;en-us;828550
ASKER CERTIFIED SOLUTION
Avatar of JR2003
JR2003

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JMoon5FTM
JMoon5FTM

PROBLEM 1.  JR2003 is right on here - if you're creating a Word object, you need to have Word installed on the client machine.  Late binding prevents Visual Basic from using information specific to the version of Word on your machine, but there is no way to create a Word object without having Word installed.

PROBLEM 2.  The "Package & Deployment Wizard" has been known to fail when when you try to install to clients running recent versions of Windows.  So I can't recommend that.

I seriously doubt Office is causing that problem, though.  Exactly what error message are you getting?  Are you distributing all of the OCXs used by your application?  What controls are on your forms?
Avatar of jag_dev

ASKER

Erick37 :
Thanks for the comment; I had already checked that article.

JR2003: You were right about PROBLEM 1. I thought that without the reference I wouldn't need Ms Office to load the exe. I'll add Ms Office as a requirement for my application.

JMoon5FTM: Thanks about the help with problem 2... I'll stay away from Package & deployment Wizard. I got no error message on problem 2, the forms just won't load. But I found that those form had the tabctl32.ocx control, so maybe InstallShield isn't upgrading to the newer version, so I'll e-mail my clients with instruction to register manually the ocx. I'll let you know if that solves the problem. (Maybe you were right, maybe Ms Office isn't guilty on Problem 2)

((Are there any tools that you use to find out this kind of problems on dll's ocx's conflicts???))

(I just got Numega SmartCheck.. I think that app might help....)

Well, thanks to all of you again...