M
Mike Chisarik
Hello,
I have inherited some VBA code that used to work in Offiice 97. It bascally
creates X number of doduments form a merge and then it is supposed to
combine them together into one document. It creates each individual document
fine. But when it goes to combined them (cut and paste, pls see code below)
the headers for documents 2 thru X do not print. Fixed text in the headers
do come out but fields in the header do not. Any help will be GREATLY
appreciated.
Mike Chisarik
(e-mail address removed)
' put all the races in one document
mfirstdoc = "RF" & Str(1) & ".DOC"
For mcounter = 2 To mracecount
mdocname = "RF" & Str(mcounter) & ".DOC"
Documents(mdocname).Activate
'select the whole document and paste to the clipboard
Selection.HomeKey unit:=wdStory, Extend:=wdExtend
Selection.WholeStory
Selection.Copy
Documents(mfirstdoc).Activate
Selection.EndKey unit:=wdStory, Extend:=wdExtend
'insert a page break
Selection.InsertBreak Type:=wdPageBreak
Selection.PasteAndFormat (wdPasteDefault)
Next
I have inherited some VBA code that used to work in Offiice 97. It bascally
creates X number of doduments form a merge and then it is supposed to
combine them together into one document. It creates each individual document
fine. But when it goes to combined them (cut and paste, pls see code below)
the headers for documents 2 thru X do not print. Fixed text in the headers
do come out but fields in the header do not. Any help will be GREATLY
appreciated.
Mike Chisarik
(e-mail address removed)
' put all the races in one document
mfirstdoc = "RF" & Str(1) & ".DOC"
For mcounter = 2 To mracecount
mdocname = "RF" & Str(mcounter) & ".DOC"
Documents(mdocname).Activate
'select the whole document and paste to the clipboard
Selection.HomeKey unit:=wdStory, Extend:=wdExtend
Selection.WholeStory
Selection.Copy
Documents(mfirstdoc).Activate
Selection.EndKey unit:=wdStory, Extend:=wdExtend
'insert a page break
Selection.InsertBreak Type:=wdPageBreak
Selection.PasteAndFormat (wdPasteDefault)
Next