Index
2001-01-05 13:35Tom Libby : Word automation with VFP 6
2001-04-16 19:03Allen : RE: Word Automation - .DisplayAlerts question
2001-05-14 12:42Andrew Dewey : Word Automation - determining if style exists
2001-05-15 00:35Anders Altberg : Re: Word Automation - determining if style exists
2001-05-16 15:11Brian.Searle@indsys.ge.com: RE: Word Automation/Bookmarks (was Word Headers)
2001-05-16 16:06Bill - Work email : Word Automation/Bookmarks (was Word Headers)
2001-05-20 20:07Cindy Winegarden : RE: Word Automation/Bookmarks (was Word Headers)
2001-05-20 21:39Bill Anderson : Character delimiters (was Word Automation/Bookmarks) (was Word Headers)
2001-05-20 22:32John Koziol : RE: Word Automation/Bookmarks (was Word Headers)
2001-05-20 22:56Cindy Winegarden : RE: Word Automation/Bookmarks (was Word Headers)
Back to top
Word automation with VFP 6

Author: Tom Libby

Posted: 2001-01-05 13:35:01   Link

Hi everyone,

I am automating MS Word 97 SR-2 from VFP 6. Everything is working fine

except for two things I need to do and cannot figure it out how:

1. How to determine if a document contains a macro.

2. How do I stop macros from running when I open the doc.

I have been at the MS site going through the Office developer documentation

and cannot find anything on this.

The problem is I need to scan these documents and determine what types of

objects are in them (hyperlinks, images, macros, document version etc...).

If I try to open the doc using Word it informs me the document contains

macros and lets me determine if I want to run them or not. But if I open it

using automation then the macro runs with no warning. Since I have no idea

who is sending these documents I would prefer not to run the macros. I

tried setting oWord.DisplayAlerts = -1 (Show all alerts) but that ddoes

nothing for macros. Any ideas?

Thanks

Tom

Shop Safely Online Without a Credit Card

http://www.rocketcash.com

©2001 Tom Libby
Back to top
RE: Word Automation - .DisplayAlerts question

Author: Allen

Posted: 2001-04-16 19:03:48   Link

Is your doc built on a template. You may need to adjust the paper size on

that or the default doc.

Allen

-----Original Message-----

From: profox@leafe.com [mailto:profox@leafe.com]On Behalf Of Andrew

Dewey

When I go to print a Document built in Word from Fox I'm getting an message

from Word that my margins are outside the printable boundaries. I get this

message even when oWord.DisplayAlerts = .F. The document prints fine. Is

there some other mechanism to turn the warning alert off? It's a bit of a

©2001 Allen
Back to top
Word Automation - determining if style exists

Author: Andrew Dewey

Posted: 2001-05-14 12:42:59   Link

I'm trying to use amembers() to test for the existence of a custom style.

I try:

nstyles = amembers(aStyles,oDoc.Styles)

and I get a result of 0. Will amembers work with non-fox objects, and if

so, what am I doing wrong.

Many Thanks,

Andrew

PS

This is the code I use to add the style:

oBodyStyle = oDoc.Styles.ADD( "Body", 1 )

Andrew Dewey

Acadia Computer Corp. Bar Harbor, ME

andrew@acadiacomp.com

©2001 Andrew Dewey
Back to top
Re: Word Automation - determining if style exists

Author: Anders Altberg

Posted: 2001-05-15 00:35:54   Link

Not until VFP7. Patience.

-A

----- Original Message -----

From: "Andrew Dewey" <andrew@acadiacomp.com>

To: "Multiple recipients of ProFox" <profox@leafe.com>

Sent: Monday, May 14, 2001 6:42 PM

Subject: Word Automation - determining if style exists

> I'm trying to use amembers() to test for the existence of a custom style.

>

> I try:

>

> nstyles = amembers(aStyles,oDoc.Styles)

>

>

> and I get a result of 0. Will amembers work with non-fox objects, and if

> so, what am I doing wrong.

>

> Many Thanks,

>

> Andrew

>

> PS

>

> This is the code I use to add the style:

> oBodyStyle = oDoc.Styles.ADD( "Body", 1 )

> Andrew Dewey

> Acadia Computer Corp. Bar Harbor, ME

> andrew@acadiacomp.com

>

>

>

©2001 Anders Altberg
Back to top
RE: Word Automation/Bookmarks (was Word Headers)

Author: Brian.Searle@indsys.ge.com

Posted: 2001-05-16 15:11:44   Link

Bill,

Sorry, I've never done anything with bookmarks.

Brian Searle

brian.searle@indsys.ge.com

> -----Original Message-----

> From: Bill - Work email [mailto:bill.coupe@welove.com]

> Sent: Wednesday, May 16, 2001 4:06 PM

> To: Multiple recipients of ProFox

> Subject: Word Automation/Bookmarks (was Word Headers)

>

>

> Brian -

>

> Do you have a method for identifying (so that you can cycle

> through them)

> all the bookmarks on a given document?

>

> Ideal would be a way to load them into an array from whatever

> container

> holds them in the document.

>

> Thanks,

>

> -Bill

>

©2001 Brian.Searle@indsys.ge.com
Back to top
Word Automation/Bookmarks (was Word Headers)

Author: Bill - Work email

Posted: 2001-05-16 16:06:28   Link

Brian -

Do you have a method for identifying (so that you can cycle through them)

all the bookmarks on a given document?

Ideal would be a way to load them into an array from whatever container

holds them in the document.

Thanks,

-Bill

----- Original Message -----

From: <Brian.Searle@indsys.ge.com>

To: "Multiple recipients of ProFox" <profox@leafe.com>

Sent: Wednesday, May 16, 2001 1:27 PM

Subject: RE: Word Headers

> Ken,

>

> I spent a lot of time on an application using Word 97 last year. I know

how

> frustrating it can be to use the Object Browser in Word and convert VB

> constants to VFP equivalents.

>

> I've included some code to show how I set up a header for a first page

with a

> different one for the remaining pages.

>

> *-- Word header example

> oWord = CREATEOBJECT("Word.Application")

> oWord.CAPTION = "My Word Document"

> oDoc = oWord.documents.ADD()

> oWord.ActiveWindow.ActivePane.VIEW.TYPE = 3 && Set to page view

> oWord.VISIBLE = .T.

> oWord.WINDOWSTATE = 1

>

> *-- Set the page margins

> WITH oDoc.PageSetup

> .TopMargin = 20

> .BottomMargin = 40

> .LeftMargin = 57.5

> .RightMargin = 20

> ENDWITH

>

> *-- Set the header information for the top of each page

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 9

>

> WITH oWord.SELECTION

> .ParagraphFormat.TabStops.ClearAll

> .ParagraphFormat.ALIGNMENT = 0

> .ParagraphFormat.TabStops.ADD(380)

> .TypeText(CHR(13)+CHR(13)+CHR(13))

> .FONT.NAME = "Times New Roman"

> .FONT.SIZE = 16

> .FONT.BOLD = .T.

> .FONT.ITALIC = .T.

> .TypeText(CHR(9)+"My Logo")

> .HeaderFooter.Shapes.AddLine(58, 94, 461, 94)

> * .HeaderFooter.Shapes.AddPicture(sys(5)+"mylogo.gif")

> .TypeText(CHR(13))

> ENDWITH

>

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 0

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 9

>

> WITH oWord.SELECTION

> .PageSetup.DifferentFirstPageHeaderFooter = .T.

> .ParagraphFormat.TabStops.ClearAll

> .ParagraphFormat.ALIGNMENT = 0

> .ParagraphFormat.TabStops.ADD(380)

> .TypeText(CHR(13)+CHR(13)+CHR(13))

> .FONT.NAME = "Times New Roman"

> .FONT.SIZE = 16

> .FONT.BOLD = .T.

> .FONT.ITALIC = .T.

> .TypeText(CHR(9)+"My Logo")

> .HeaderFooter.Shapes.AddLine(58, 94, 461, 94)

> * .HeaderFooter.Shapes.AddPicture(sys(5)+"mylogo.gif")

> .TypeText(CHR(13))

> .FONT.SIZE = 8

> .FONT.BOLD = .F.

> .FONT.ITALIC = .F.

> .TypeText(CHR(13))

> .TypeText(CHR(9)+"First page info only")

> .TypeText(CHR(13))

> ENDWITH

>

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 0

>

> WITH oWord.SELECTION

> .InsertBreak(7)

> .TypeText(CHR(9)+"Some stuff on another page")

> ENDWITH

>

> In the case that it matters, this runs using VFP6 SP4 and Word 97 (it

works in

> 2000 as well).

> HTH

>

> Brian Searle

> brian.searle@indsys.ge.com

>

>

> > -----Original Message-----

> > From: Teague Ken Contr ESC/XP [mailto:Ken.Teague@hanscom.af.mil]

> > Sent: Wednesday, May 16, 2001 10:54 AM

> > To: Multiple recipients of ProFox

> > Subject: Word Headers

> >

> >

> >

> > In creating a word document via automation I need to create

> > one header for

> > the first page, then a different header for the subsequent

> > pages. Do anyone

> > have code that I can use as guide to create?

> >

> >

> > Ken.Teague@Hanscom.AF.MIL

> >

> >

> >

> >

> > >

>

>

©2001 Bill - Work email
Back to top
RE: Word Automation/Bookmarks (was Word Headers)

Author: Cindy Winegarden

Posted: 2001-05-20 20:07:33   Link

Bill and Brian,

Forgive me if this has been answered already. There is a bookmarks

collection in the Word object model. Then you can use code like:

oWord = CREATEOBJECT([Word.Application])

oWord.Visible = .T.

oDocument = oWord.Documents.Add([MyDoc.DOC])

*!* Assume you've got some bookmarks in this document

FOR EACH oBookmark IN oDocument.Bookmarks

oBookmark.Select()

ENDFOR

Cindy Winegarden MCSD, MVP

cindy.winegarden@mvps.org

-----Original Message-----

From: profox@leafe.com [mailto:profox@leafe.com] On Behalf Of Bill -

Work email

Sent: Wednesday, May 16, 2001 4:06 PM

To: Multiple recipients of ProFox

Subject: Word Automation/Bookmarks (was Word Headers)

Brian -

Do you have a method for identifying (so that you can cycle through

them) all the bookmarks on a given document?

Ideal would be a way to load them into an array from whatever container

holds them in the document.

Thanks,

-Bill

----- Original Message -----

From: <Brian.Searle@indsys.ge.com>

To: "Multiple recipients of ProFox" <profox@leafe.com>

Sent: Wednesday, May 16, 2001 1:27 PM

Subject: RE: Word Headers

> Ken,

>

> I spent a lot of time on an application using Word 97 last year. I

> know

how

> frustrating it can be to use the Object Browser in Word and convert VB

> constants to VFP equivalents.

>

> I've included some code to show how I set up a header for a first page

with a

> different one for the remaining pages.

>

> *-- Word header example

> oWord = CREATEOBJECT("Word.Application")

> oWord.CAPTION = "My Word Document"

> oDoc = oWord.documents.ADD() oWord.ActiveWindow.ActivePane.VIEW.TYPE

> = 3 && Set to page view oWord.VISIBLE = .T.

> oWord.WINDOWSTATE = 1

>

> *-- Set the page margins

> WITH oDoc.PageSetup

> .TopMargin = 20

> .BottomMargin = 40

> .LeftMargin = 57.5

> .RightMargin = 20

> ENDWITH

>

> *-- Set the header information for the top of each page

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 9

>

> WITH oWord.SELECTION

> .ParagraphFormat.TabStops.ClearAll

> .ParagraphFormat.ALIGNMENT = 0

> .ParagraphFormat.TabStops.ADD(380)

> .TypeText(CHR(13)+CHR(13)+CHR(13))

> .FONT.NAME = "Times New Roman"

> .FONT.SIZE = 16

> .FONT.BOLD = .T.

> .FONT.ITALIC = .T.

> .TypeText(CHR(9)+"My Logo")

> .HeaderFooter.Shapes.AddLine(58, 94, 461, 94)

> * .HeaderFooter.Shapes.AddPicture(sys(5)+"mylogo.gif")

> .TypeText(CHR(13))

> ENDWITH

>

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 0

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 9

>

> WITH oWord.SELECTION .PageSetup.DifferentFirstPageHeaderFooter = .T.

> .ParagraphFormat.TabStops.ClearAll

> .ParagraphFormat.ALIGNMENT = 0

> .ParagraphFormat.TabStops.ADD(380)

> .TypeText(CHR(13)+CHR(13)+CHR(13))

> .FONT.NAME = "Times New Roman"

> .FONT.SIZE = 16

> .FONT.BOLD = .T.

> .FONT.ITALIC = .T.

> .TypeText(CHR(9)+"My Logo")

> .HeaderFooter.Shapes.AddLine(58, 94, 461, 94)

> * .HeaderFooter.Shapes.AddPicture(sys(5)+"mylogo.gif")

> .TypeText(CHR(13))

> .FONT.SIZE = 8

> .FONT.BOLD = .F.

> .FONT.ITALIC = .F.

> .TypeText(CHR(13))

> .TypeText(CHR(9)+"First page info only")

> .TypeText(CHR(13))

> ENDWITH

>

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 0

>

> WITH oWord.SELECTION

> .InsertBreak(7)

> .TypeText(CHR(9)+"Some stuff on another page")

> ENDWITH

>

> In the case that it matters, this runs using VFP6 SP4 and Word 97 (it

works in

> 2000 as well).

> HTH

>

> Brian Searle

> brian.searle@indsys.ge.com

>

>

> > -----Original Message-----

> > From: Teague Ken Contr ESC/XP [mailto:Ken.Teague@hanscom.af.mil]

> > Sent: Wednesday, May 16, 2001 10:54 AM

> > To: Multiple recipients of ProFox

> > Subject: Word Headers

> >

> >

> >

> > In creating a word document via automation I need to create one

> > header for the first page, then a different header for the

> > subsequent pages. Do anyone

> > have code that I can use as guide to create?

> >

> >

> > Ken.Teague@Hanscom.AF.MIL

©2001 Cindy Winegarden
Back to top
Character delimiters (was Word Automation/Bookmarks) (was Word Headers)

Author: Bill Anderson

Posted: 2001-05-20 21:39:08   Link

I've used brackets as character delimiters for 13 years. Works just

fine, and it avoids conflicts with single and double quotes.

Bill Anderson

John Koziol wrote:

> Hmmm....OK, if it works what-the-hell!

©2001 Bill Anderson
Back to top
RE: Word Automation/Bookmarks (was Word Headers)

Author: John Koziol

Posted: 2001-05-20 22:32:25   Link

OK, I'm gonna assume there is a compelling reason for the brackets in place

of the normal quotes.... ;-)

-----Original Message-----

From: profox@leafe.com [mailto:profox@leafe.com]On Behalf Of Cindy

Winegarden

Sent: Sunday, May 20, 2001 8:08 PM

To: Multiple recipients of ProFox

Subject: RE: Word Automation/Bookmarks (was Word Headers)

Bill and Brian,

Forgive me if this has been answered already. There is a bookmarks

collection in the Word object model. Then you can use code like:

oWord = CREATEOBJECT([Word.Application])

oWord.Visible = .T.

oDocument = oWord.Documents.Add([MyDoc.DOC])

*!* Assume you've got some bookmarks in this document

FOR EACH oBookmark IN oDocument.Bookmarks

oBookmark.Select()

ENDFOR

Cindy Winegarden MCSD, MVP

cindy.winegarden@mvps.org

-----Original Message-----

From: profox@leafe.com [mailto:profox@leafe.com] On Behalf Of Bill -

Work email

Sent: Wednesday, May 16, 2001 4:06 PM

To: Multiple recipients of ProFox

Subject: Word Automation/Bookmarks (was Word Headers)

Brian -

Do you have a method for identifying (so that you can cycle through

them) all the bookmarks on a given document?

Ideal would be a way to load them into an array from whatever container

holds them in the document.

Thanks,

-Bill

----- Original Message -----

From: <Brian.Searle@indsys.ge.com>

To: "Multiple recipients of ProFox" <profox@leafe.com>

Sent: Wednesday, May 16, 2001 1:27 PM

Subject: RE: Word Headers

> Ken,

>

> I spent a lot of time on an application using Word 97 last year. I

> know

how

> frustrating it can be to use the Object Browser in Word and convert VB

> constants to VFP equivalents.

>

> I've included some code to show how I set up a header for a first page

with a

> different one for the remaining pages.

>

> *-- Word header example

> oWord = CREATEOBJECT("Word.Application")

> oWord.CAPTION = "My Word Document"

> oDoc = oWord.documents.ADD() oWord.ActiveWindow.ActivePane.VIEW.TYPE

> = 3 && Set to page view oWord.VISIBLE = .T.

> oWord.WINDOWSTATE = 1

>

> *-- Set the page margins

> WITH oDoc.PageSetup

> .TopMargin = 20

> .BottomMargin = 40

> .LeftMargin = 57.5

> .RightMargin = 20

> ENDWITH

>

> *-- Set the header information for the top of each page

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 9

>

> WITH oWord.SELECTION

> .ParagraphFormat.TabStops.ClearAll

> .ParagraphFormat.ALIGNMENT = 0

> .ParagraphFormat.TabStops.ADD(380)

> .TypeText(CHR(13)+CHR(13)+CHR(13))

> .FONT.NAME = "Times New Roman"

> .FONT.SIZE = 16

> .FONT.BOLD = .T.

> .FONT.ITALIC = .T.

> .TypeText(CHR(9)+"My Logo")

> .HeaderFooter.Shapes.AddLine(58, 94, 461, 94)

> * .HeaderFooter.Shapes.AddPicture(sys(5)+"mylogo.gif")

> .TypeText(CHR(13))

> ENDWITH

>

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 0

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 9

>

> WITH oWord.SELECTION .PageSetup.DifferentFirstPageHeaderFooter = .T.

> .ParagraphFormat.TabStops.ClearAll

> .ParagraphFormat.ALIGNMENT = 0

> .ParagraphFormat.TabStops.ADD(380)

> .TypeText(CHR(13)+CHR(13)+CHR(13))

> .FONT.NAME = "Times New Roman"

> .FONT.SIZE = 16

> .FONT.BOLD = .T.

> .FONT.ITALIC = .T.

> .TypeText(CHR(9)+"My Logo")

> .HeaderFooter.Shapes.AddLine(58, 94, 461, 94)

> * .HeaderFooter.Shapes.AddPicture(sys(5)+"mylogo.gif")

> .TypeText(CHR(13))

> .FONT.SIZE = 8

> .FONT.BOLD = .F.

> .FONT.ITALIC = .F.

> .TypeText(CHR(13))

> .TypeText(CHR(9)+"First page info only")

> .TypeText(CHR(13))

> ENDWITH

>

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 0

>

> WITH oWord.SELECTION

> .InsertBreak(7)

> .TypeText(CHR(9)+"Some stuff on another page")

> ENDWITH

>

> In the case that it matters, this runs using VFP6 SP4 and Word 97 (it

works in

> 2000 as well).

> HTH

>

> Brian Searle

> brian.searle@indsys.ge.com

>

>

> > -----Original Message-----

> > From: Teague Ken Contr ESC/XP [mailto:Ken.Teague@hanscom.af.mil]

> > Sent: Wednesday, May 16, 2001 10:54 AM

> > To: Multiple recipients of ProFox

> > Subject: Word Headers

> >

> >

> >

> > In creating a word document via automation I need to create one

> > header for the first page, then a different header for the

> > subsequent pages. Do anyone

> > have code that I can use as guide to create?

> >

> >

> > Ken.Teague@Hanscom.AF.MIL

©2001 John Koziol
Back to top
RE: Word Automation/Bookmarks (was Word Headers)

Author: Cindy Winegarden

Posted: 2001-05-20 22:56:16   Link

JK,

I do a lot of SQL Pass-through involving the use of internal quotes.

Brackets solve so many problems that I began using them everywhere.

Consider the following:

cMySQL = ;

[SELECT * FROM MyTable ] + ;

[WHERE MyField = "Adam's Apple" ]

Cindy Winegarden MCSD, MVP

cindy.winegarden@mvps.org

-----Original Message-----

From: profox@leafe.com [mailto:profox@leafe.com] On Behalf Of John

Koziol

Sent: Sunday, May 20, 2001 10:32 PM

To: Multiple recipients of ProFox

Subject: RE: Word Automation/Bookmarks (was Word Headers)

OK, I'm gonna assume there is a compelling reason for the brackets in

place of the normal quotes.... ;-)

-----Original Message-----

From: profox@leafe.com [mailto:profox@leafe.com]On Behalf Of Cindy

Winegarden

Sent: Sunday, May 20, 2001 8:08 PM

To: Multiple recipients of ProFox

Subject: RE: Word Automation/Bookmarks (was Word Headers)

Bill and Brian,

Forgive me if this has been answered already. There is a bookmarks

collection in the Word object model. Then you can use code like:

oWord = CREATEOBJECT([Word.Application])

oWord.Visible = .T.

oDocument = oWord.Documents.Add([MyDoc.DOC])

*!* Assume you've got some bookmarks in this document

FOR EACH oBookmark IN oDocument.Bookmarks

oBookmark.Select()

ENDFOR

Cindy Winegarden MCSD, MVP

cindy.winegarden@mvps.org

-----Original Message-----

From: profox@leafe.com [mailto:profox@leafe.com] On Behalf Of Bill -

Work email

Sent: Wednesday, May 16, 2001 4:06 PM

To: Multiple recipients of ProFox

Subject: Word Automation/Bookmarks (was Word Headers)

Brian -

Do you have a method for identifying (so that you can cycle through

them) all the bookmarks on a given document?

Ideal would be a way to load them into an array from whatever container

holds them in the document.

Thanks,

-Bill

----- Original Message -----

From: <Brian.Searle@indsys.ge.com>

To: "Multiple recipients of ProFox" <profox@leafe.com>

Sent: Wednesday, May 16, 2001 1:27 PM

Subject: RE: Word Headers

> Ken,

>

> I spent a lot of time on an application using Word 97 last year. I

> know

how

> frustrating it can be to use the Object Browser in Word and convert VB

> constants to VFP equivalents.

>

> I've included some code to show how I set up a header for a first page

with a

> different one for the remaining pages.

>

> *-- Word header example

> oWord = CREATEOBJECT("Word.Application")

> oWord.CAPTION = "My Word Document"

> oDoc = oWord.documents.ADD() oWord.ActiveWindow.ActivePane.VIEW.TYPE

> = 3 && Set to page view oWord.VISIBLE = .T.

> oWord.WINDOWSTATE = 1

>

> *-- Set the page margins

> WITH oDoc.PageSetup

> .TopMargin = 20

> .BottomMargin = 40

> .LeftMargin = 57.5

> .RightMargin = 20

> ENDWITH

>

> *-- Set the header information for the top of each page

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 9

>

> WITH oWord.SELECTION

> .ParagraphFormat.TabStops.ClearAll

> .ParagraphFormat.ALIGNMENT = 0

> .ParagraphFormat.TabStops.ADD(380)

> .TypeText(CHR(13)+CHR(13)+CHR(13))

> .FONT.NAME = "Times New Roman"

> .FONT.SIZE = 16

> .FONT.BOLD = .T.

> .FONT.ITALIC = .T.

> .TypeText(CHR(9)+"My Logo")

> .HeaderFooter.Shapes.AddLine(58, 94, 461, 94)

> * .HeaderFooter.Shapes.AddPicture(sys(5)+"mylogo.gif")

> .TypeText(CHR(13))

> ENDWITH

>

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 0

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 9

>

> WITH oWord.SELECTION .PageSetup.DifferentFirstPageHeaderFooter = .T.

> .ParagraphFormat.TabStops.ClearAll

> .ParagraphFormat.ALIGNMENT = 0

> .ParagraphFormat.TabStops.ADD(380)

> .TypeText(CHR(13)+CHR(13)+CHR(13))

> .FONT.NAME = "Times New Roman"

> .FONT.SIZE = 16

> .FONT.BOLD = .T.

> .FONT.ITALIC = .T.

> .TypeText(CHR(9)+"My Logo")

> .HeaderFooter.Shapes.AddLine(58, 94, 461, 94)

> * .HeaderFooter.Shapes.AddPicture(sys(5)+"mylogo.gif")

> .TypeText(CHR(13))

> .FONT.SIZE = 8

> .FONT.BOLD = .F.

> .FONT.ITALIC = .F.

> .TypeText(CHR(13))

> .TypeText(CHR(9)+"First page info only")

> .TypeText(CHR(13))

> ENDWITH

>

> oWord.ActiveWindow.ActivePane.VIEW.SeekView = 0

>

> WITH oWord.SELECTION

> .InsertBreak(7)

> .TypeText(CHR(9)+"Some stuff on another page")

> ENDWITH

>

> In the case that it matters, this runs using VFP6 SP4 and Word 97 (it

works in

> 2000 as well).

> HTH

>

> Brian Searle

> brian.searle@indsys.ge.com

>

>

> > -----Original Message-----

> > From: Teague Ken Contr ESC/XP [mailto:Ken.Teague@hanscom.af.mil]

> > Sent: Wednesday, May 16, 2001 10:54 AM

> > To: Multiple recipients of ProFox

> > Subject: Word Headers

> >

> >

> >

> > In creating a word document via automation I need to create one

> > header for the first page, then a different header for the

> > subsequent pages. Do anyone have code that I can use as guide to

> > create?

> >

> >

> > Ken.Teague@Hanscom.AF.MIL

©2001 Cindy Winegarden