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
Set objW = Nothing

Exit Function
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?

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,

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.
Who is Participating?
JR2003Connect With a Mentor Commented:
PROBLEM 1. Error 329: Can´t Create ActiveX object. - I found this error on some computers without Ms Office.
You will still need office installed on your target computer. Creating the "Word.Application" using CreateObject just means that you don't need the exact same version of word installed on the target machine as is installed on the development machine. But you still need a version of office on the target computer!

When you make a setup for your application you will need a lot of other dll and ocx installed too. To ensure this you should use "Package Deployment Wizard" that comes with VB.

This may help:

You receive run-time error 429 when you automate Office applications;en-us;828550
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?
jag_devAuthor Commented:
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...
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.