Question about OLE automation between Word & VFP 
Author Message
 Question about OLE automation between Word & VFP

I want to use OLE automation in VFP to create a Word document. But I have
some questions:

1. In VFP's sample program, it used command "InsertAfter", I think it is a
VB command because I can't found it in Word basic. But I found other sample
programs using Word basic, such as "FileNew" and "EditGoTo" Actually, which
type of command I should use in OLE automation - VB, Word basic or both ?

2. I found following statement in different program - '\word.basic',
'\word.document', and \word.application'). What is the difference between
these statements ? Is it control the type of command I will be use in OLE
automation?

3. If I can use VB command, there are some constants defined, i.e.
wdOrientLandscape in pagesetup,  how can I use those constants in VFP when
OLE automation started. I means the code format. Like this one -
"oWord.PageSetup.orientation=wdOrientLandscape", it is not work in VFP, what
is the correct format ?

Please help me to make clear the above questions.
Thanks



Mon, 08 Oct 2001 03:00:00 GMT  
 Question about OLE automation between Word & VFP
Briefly

You use VB and you need to define the constants.  You can get the necessary
constants in file that can be downloaded from:

http://home.att.net/~john.harvey/foxpro/makehfile.zip

Quote:

>I want to use OLE automation in VFP to create a Word document. But I have
>some questions:

>1. In VFP's sample program, it used command "InsertAfter", I think it is a
>VB command because I can't found it in Word basic. But I found other sample
>programs using Word basic, such as "FileNew" and "EditGoTo" Actually, which
>type of command I should use in OLE automation - VB, Word basic or both ?

>2. I found following statement in different program - '\word.basic',
>'\word.document', and \word.application'). What is the difference between
>these statements ? Is it control the type of command I will be use in OLE
>automation?

>3. If I can use VB command, there are some constants defined, i.e.
>wdOrientLandscape in pagesetup,  how can I use those constants in VFP when
>OLE automation started. I means the code format. Like this one -
>"oWord.PageSetup.orientation=wdOrientLandscape", it is not work in VFP,
what
>is the correct format ?

>Please help me to make clear the above questions.
>Thanks



Mon, 08 Oct 2001 03:00:00 GMT  
 Question about OLE automation between Word & VFP
As far as I know, Word97 supports the Visual Basic for Applications subset
of VB's syntax...

--
William Fields
US Bankruptcy Court
Phoenix, AZ



Quote:
> I want to use OLE automation in VFP to create a Word document. But I have
> some questions:

> 1. In VFP's sample program, it used command "InsertAfter", I think it is
a
> VB command because I can't found it in Word basic. But I found other
sample
> programs using Word basic, such as "FileNew" and "EditGoTo" Actually,
which
> type of command I should use in OLE automation - VB, Word basic or both ?

> 2. I found following statement in different program - '\word.basic',
> '\word.document', and \word.application'). What is the difference between
> these statements ? Is it control the type of command I will be use in OLE
> automation?

> 3. If I can use VB command, there are some constants defined, i.e.
> wdOrientLandscape in pagesetup,  how can I use those constants in VFP
when
> OLE automation started. I means the code format. Like this one -
> "oWord.PageSetup.orientation=wdOrientLandscape", it is not work in VFP,
what
> is the correct format ?

> Please help me to make clear the above questions.
> Thanks



Mon, 08 Oct 2001 03:00:00 GMT  
 Question about OLE automation between Word & VFP
On how to use Word from VFP there are numerous examples on the Universal
Thread www.universalthread.com

For the constants, you'll find them on David Frankenbach site.
Go to my site first, then click on the little fox, and after some time
you'll reach his site.

Jos

Jos Constant
Constant Software Systems
B-4650 Herve
http://gallery.uunet.be/Jose



Thu, 11 Oct 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. OLE Automation - Word & Graph

2. Word OLE Automation question.

3. OLE / VFP5 Word Automation Question

4. VFP-Word OLE Automation

5. VFP OLE automation with Word

6. VFP & OMNI OLE Automation

7. OLE, VFP & Word

8. Word 97 OLE Automation error

9. OLE Automation of Microsoft Word

10. OLE Automation of Microsoft Word

11. OLE Automation, Word 9 and fast machines

12. ole Automation and Word

 

 
Powered by phpBB® Forum Software