Foxpro 7.0 OLE automation with Word XP. 
Author Message
 Foxpro 7.0 OLE automation with Word XP.

Hi,

Is it me or is the Office XP developers guide woefully lacking in proper
documentation.

It does not go deep enough.

For example the following VB.NET code :-

Dim oWord As Word.Application

oWord = New Word.Application()

oWord.Documents.Add()

oWord.Visible = True

oWord.CommandBars("Menu Bar").Controls("Edit").Enabled = False

oWord.CommandBars("Menu Bar").Controls("Tools").Enabled = False

The CommandBars lines do not work in fox. Some microsoft documentation I
found says that you cannot use "Menu Bar" text in fox and that it has to be
a number. (constant)

Where is the documentation that explains what the "menu bar" number is.

Example 2:

I want to enable the Envelopes and labels option in word from foxpro. How do
I find out what the menu item is called let alone find out the constant.

Basically can anyone recommend a book or point me to the documentation that
explains what every word object does, what the properties are for each
object and what the methods are that can be called and how they work.

Talk about making life difficult for us programmers!!!! ;-)

Regards

Mike



Fri, 10 Dec 2004 23:29:35 GMT  
 Foxpro 7.0 OLE automation with Word XP.
Run, don't walk, to http://www.hentzenwerke.com and get Granor & Martin's
book "Office Automation with VFP".

It deals with an earlier version of Office but the concepts apply 100% to
Office XP.

You can find documentation of the object model, as always, in the VBA help
file that ships with Office. Not sure about XP, but in earlier versions you
had to do a custom setup to get it installed.

The numbers you are looking for are likely #DEFINEd contstants. There are a
number of tools floating around for extracting constant definitions from a
type library. Do a search on the Universal Thread.

Dan


Quote:
> Hi,

> Is it me or is the Office XP developers guide woefully lacking in proper
> documentation.

> It does not go deep enough.

> For example the following VB.NET code :-

> Dim oWord As Word.Application

> oWord = New Word.Application()

> oWord.Documents.Add()

> oWord.Visible = True

> oWord.CommandBars("Menu Bar").Controls("Edit").Enabled = False

> oWord.CommandBars("Menu Bar").Controls("Tools").Enabled = False

> The CommandBars lines do not work in fox. Some microsoft documentation I
> found says that you cannot use "Menu Bar" text in fox and that it has to
be
> a number. (constant)

> Where is the documentation that explains what the "menu bar" number is.

> Example 2:

> I want to enable the Envelopes and labels option in word from foxpro. How
do
> I find out what the menu item is called let alone find out the constant.

> Basically can anyone recommend a book or point me to the documentation
that
> explains what every word object does, what the properties are for each
> object and what the methods are that can be called and how they work.

> Talk about making life difficult for us programmers!!!! ;-)

> Regards

> Mike



Sat, 11 Dec 2004 01:05:32 GMT  
 Foxpro 7.0 OLE automation with Word XP.
Thanks Dan, I'll take a look

Regards

Mike



Sat, 11 Dec 2004 22:07:09 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Word automation in Windows XP/Word 2002

2. VFP OLE Automation to Excel 7.0

3. How to use Excel OLE Automation - VFP5.0 and Excel 7.0

4. Cannot merge Visual FoxPro 6 data source using MS Query in Word 97 on Windows XP

5. How To Connect Visual FoxPro 7 Data Source to Word 2002 (or Office XP Applications)

6. Using OLE with Word 7.0

7. Fox integration with Word XP.

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