The easiest way to get any code in Word is to use macro-recording. Set on recording, do what you want, and you have your code:
Standing in the open document.
And you're done.Code:Documents.Open FileName:="MyFile.doc" 'Opens the other document Selection.WholeStory 'Selects all text Selection.Copy 'Copy text ActiveWindow.Close 'Closes that document Selection.EndKey Unit:=wdStory 'Goes to the end of the 1st document Selection.Paste 'Paste the text here




Reply With Quote