Solved

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

Posted on 2004-09-17
4
625 Views
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
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.
0
Comment
Question by:jag_dev
4 Comments
 
LVL 32

Expert Comment

by:Erick37
ID: 12088972
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
0
 
LVL 18

Accepted Solution

by:
JR2003 earned 250 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!


PROBLEM 2.
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.

0
 
LVL 5

Expert Comment

by:JMoon5FTM
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?
0
 
LVL 1

Author Comment

by:jag_dev
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...
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

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…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…

760 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now