请用vf代码怎样将若干个word文档合并成一个文档呢?如word1、word2、word3合成word,且后一个文档在新的一页?谢谢了!·!!!!
------解决方案--------------------------------------------------------
大概这样就可以了:
- VB code
DIMENSION laFiles[3]m.laFiles[1] = 'c:\1.doc'm.laFiles[2] = 'c:\2.doc'm.laFiles[3] = 'c:\3.doc'm.loWord = NewObject('Word.Application')With m.loWord As Word.Application .Documents.Open(m.laFiles[1]) For m.ii = 2 To ALen(m.laFiles) .Documents.Open(m.laFiles[m.ii]) .Selection.WholeStory() .Selection.Copy() .ActiveWindow.Close() .Selection.EndKey(6) .Selection.InsertBreak(7) .Selection.PasteAndFormat(0) EndFor .Documents.Close() .Quit()EndWithm.loWord = Null