I have some VBA code that copies the contents of one word document to the end of another. The code looks like this:
This code works, but is there a more direct or better way to do this? Something like this:
obj_Output_Doc.Append obj_Work_Doc.WholeThing
Code:
dim obj_Work_Doc as Word.Document
dim obj_Output_Doc as Word.Document
obj_Work_Doc.Activate
obj_Work_Doc.Application.Selection.WholeStory
obj_Work_Doc.Application.Selection.Copy
obj_Output_Doc.Activate
obj_Output_Doc.Application.Selection.EndOf Unit:=wdStory, Extend:=wdMove
obj_Output_Doc.Application.Selection.PasteAndFormat (wdPasteDefault)
obj_Output_Doc.Application.Selection.InsertBreak Type:=wdPageBreak
This code works, but is there a more direct or better way to do this? Something like this:
obj_Output_Doc.Append obj_Work_Doc.WholeThing