Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2004-09-17
Medium Priority
Last Modified: 2013-11-14
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.
Question by:jag_dev
LVL 32

Expert Comment

ID: 12088972
This may help:

You receive run-time error 429 when you automate Office applications
LVL 18

Accepted Solution

JR2003 earned 750 total points
ID: 12089713
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.


Expert Comment

ID: 12096627
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?

Author Comment

ID: 12097066
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...

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question