Document.Merge (Word)

Merges the changes marked with revision marks from one document to another.

Merge (FileName, MergeTarget, DetectFormatChanges, UseFormattingFrom, AddToRecentFiles)


If InStr(1, ActiveDocument.Name, "sales2.doc", 1) Then _ 
 ActiveDocument.Merge Name:="C:\Docs\Sales1.doc"

Arguments

The following argument is required

FileName - String

Optional arguments

The following arguments are optional

MergeTarget (WdMergeTarget) - Specifies where to place the final merged content.

Possible return values are wdMergeTargetCurrent - Merge into current document, wdMergeTargetNew - Merge into new document, wdMergeTargetSelected - Merge into selected document.

DetectFormatChanges (Boolean) - Specifies whether or not to mark formatting differences.

UseFormattingFrom (WdUseFormattingFrom) - Specifies which document to use for formatting in the merged document.

Possible return values are wdFormattingFromCurrent - Copy source formatting from the current item, wdFormattingFromPrompt - Prompt the user for formatting to use, wdFormattingFromSelected - Copy source formatting from the current selection.

AddToRecentFiles (Boolean) - Specifies whether to add the document in the Name parameter to the list of recent files.