creating a word file from few differen word file using OLE

creating a word file from few differen word file using OLE

Post by dhab » Wed, 13 Dec 2006 02:38:38



have a 43 .doc files. i would like to combine all files in one doc
file? can i use fox pro OLE to accomplish above
 
 
 

creating a word file from few differen word file using OLE

Post by Cindy Wine » Wed, 13 Dec 2006 05:26:28

Hi Dhabu,

Please see my reply to your post in the ....Reports.Printing group.

--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
XXXX@XXXXX.COM

 
 
 

creating a word file from few differen word file using OLE

Post by dhab » Fri, 22 Dec 2006 22:41:27

Hi Cindy,

That was big help. I have one more problem.

I have formatted document templet on which all the documents are copied
and pest. I wpuld like to insert filename and path in footerfor each
documents through OLE.
 
 
 

creating a word file from few differen word file using OLE

Post by Cindy Wine » Mon, 25 Dec 2006 04:10:24

Hi Dhabu,

Use code like this:

oWord = CreateObject("Word.Application")
oWord.Visible = .T. && For testing
oDoc = oWord.Documents.Add()
oRange = oDoc.sections(1).Footers(1).Range
oWord.NormalTemplate.AutoTextEntries("Filename and path").Insert(oRange)

--
Cindy Winegarden MCSD, Microsoft Most Valuable Professional
XXXX@XXXXX.COM