#DEFINE wdPageBreak 7 #DEFINE wdCollapseEnd 0 loWord = CREATEOBJECT('word.application') loWord.Visible = .t. &&for debugging loWord.Documents.ADD() loWord.ActiveDocument.RANGE.InsertFile('c:\testa\doc a.doc') &&doc a is there and the cursor is at the begginning of the inserted text loWord.ActiveDocument.RANGE.Collapse(wdCollapseEnd) &&this doesn't seem to do anything loWord.ActiveDocument.RANGE.InsertBreak(wdPageBreak) &&Now I have 2 pages, but the inserted text disappears!!!In fact, whatever I do, the file that I just inserted, gets overwritten by whatever I insert next. How can I make sure that whatever I insert get inserted AFTER the text?
>>open a blank 'master' file in word >> >>for as many files as there are in the folder do this: >> open up file n >> select the entire file >> copy >> close the file >> paste into the master file >> simulate a control->enter to get a new page >>end for >>>>