I am trying to use a word document and the program gives
me an error on the "CreateObject" line below. I have
made sure I selected ActiveX controls under the
Tools/Options section. I started selecting a bunch of
Microsoft programs. What am I doing wrong? Am I
supposed to compile this code differently?
The exact error message is:
Class Definition Word.Application not found.

I am guessing; I am forgeting to include an API library
of some sort. But where?

*********** code segment *******************************
cTargetFile = alltrim(pr_WFile) + ".rtf"
if CreateWordInvoice(cTargetFile)
local oWord
oWord = CreateObject("Word.application")
oWord.Documents.Open(dir_temp+cTargetFile)
oWord.Documents(cTargetFile).activewindow.visible = .T.
release oWord
endif
**********************************************************

Re: Using Word documents by Dan

Dan
Tue Sep 16 15:49:51 CDT 2003

You don't need to do anything in Tools->Options to enable automation.

This sort of error usually means that Word is improperly installed on your
system. Reinstall it.

Dan

"emily" <emel@reporterworks.com> wrote in message
news:035901c37c90$58516510$a401280a@phx.gbl...
> I am trying to use a word document and the program gives
> me an error on the "CreateObject" line below. I have
> made sure I selected ActiveX controls under the
> Tools/Options section. I started selecting a bunch of
> Microsoft programs. What am I doing wrong? Am I
> supposed to compile this code differently?
> The exact error message is:
> Class Definition Word.Application not found.
>
> I am guessing; I am forgeting to include an API library
> of some sort. But where?
>
> *********** code segment *******************************
> cTargetFile = alltrim(pr_WFile) + ".rtf"
> if CreateWordInvoice(cTargetFile)
> local oWord
> oWord = CreateObject("Word.application")
> oWord.Documents.Open(dir_temp+cTargetFile)
> oWord.Documents(cTargetFile).activewindow.visible = .T.
> release oWord
> endif
> **********************************************************
>
>



Re: Using Word documents by emily

emily
Wed Sep 17 10:35:07 CDT 2003

You there's a thought. It would make sense why it works
on some machines and not others. There is one thing
though: what needs to be changed in the installation of
Word? This code is a software program that is in
distrubuted. I would like to be able to tell my users
they need to re-install there Word, and also tell them
what to look for once re-installing.


>-----Original Message-----
>You don't need to do anything in Tools->Options to
enable automation.
>
>This sort of error usually means that Word is improperly
installed on your
>system. Reinstall it.
>
>Dan
>
>"emily" <emel@reporterworks.com> wrote in message
>news:035901c37c90$58516510$a401280a@phx.gbl...
>> I am trying to use a word document and the program
gives
>> me an error on the "CreateObject" line below. I have
>> made sure I selected ActiveX controls under the
>> Tools/Options section. I started selecting a bunch of
>> Microsoft programs. What am I doing wrong? Am I
>> supposed to compile this code differently?
>> The exact error message is:
>> Class Definition Word.Application not found.
>>
>> I am guessing; I am forgeting to include an API library
>> of some sort. But where?
>>
>> *********** code segment
*******************************
>> cTargetFile = alltrim(pr_WFile) + ".rtf"
>> if CreateWordInvoice(cTargetFile)
>> local oWord
>> oWord = CreateObject("Word.application")
>> oWord.Documents.Open(dir_temp+cTargetFile)
>> oWord.Documents(cTargetFile).activewindow.visible
= .T.
>> release oWord
>> endif
>>
**********************************************************
>>
>>
>
>
>.
>

Re: Using Word documents by Dan

Dan
Wed Sep 17 10:55:36 CDT 2003

I have no clue what to tell them to change. Usually, "default settings"
suffice.

Lord only knows what users have done during their installs. <s>

Dan

"emily" <emel@reporterworks.com> wrote in message
news:60e201c37d31$45df7dd0$a601280a@phx.gbl...
> You there's a thought. It would make sense why it works
> on some machines and not others. There is one thing
> though: what needs to be changed in the installation of
> Word? This code is a software program that is in
> distrubuted. I would like to be able to tell my users
> they need to re-install there Word, and also tell them
> what to look for once re-installing.
>
>
> >-----Original Message-----
> >You don't need to do anything in Tools->Options to
> enable automation.
> >
> >This sort of error usually means that Word is improperly
> installed on your
> >system. Reinstall it.
> >
> >Dan
> >
> >"emily" <emel@reporterworks.com> wrote in message
> >news:035901c37c90$58516510$a401280a@phx.gbl...
> >> I am trying to use a word document and the program
> gives
> >> me an error on the "CreateObject" line below. I have
> >> made sure I selected ActiveX controls under the
> >> Tools/Options section. I started selecting a bunch of
> >> Microsoft programs. What am I doing wrong? Am I
> >> supposed to compile this code differently?
> >> The exact error message is:
> >> Class Definition Word.Application not found.
> >>
> >> I am guessing; I am forgeting to include an API library
> >> of some sort. But where?
> >>
> >> *********** code segment
> *******************************
> >> cTargetFile = alltrim(pr_WFile) + ".rtf"
> >> if CreateWordInvoice(cTargetFile)
> >> local oWord
> >> oWord = CreateObject("Word.application")
> >> oWord.Documents.Open(dir_temp+cTargetFile)
> >> oWord.Documents(cTargetFile).activewindow.visible
> = .T.
> >> release oWord
> >> endif
> >>
> **********************************************************
> >>
> >>
> >
> >
> >.
> >