How to programmatically use the Compare and Combine Documents ... function from C #?

Question

Is it possible to call the Word 2003 Tools> Compare and Merge Documents ... "function from C # and get feedback on whether any differences were detected?

What i have found so far

The function can be called so. But I don’t know how to get feedback, if any differences were found.

private void CompareAndMergeWithFileB(string fullFilePath) { string FileName = fullFilePath; object MergeTarget = WdMergeTarget.wdMergeTargetSelected; object DetectFormatChanges = false; object UseFormattingFrom = WdUseFormattingFrom.wdFormattingFromPrompt; object AddToRecentFiles = true; word.ActiveDocument.Merge(FileName, MergeTarget, DetectFormatChanges, UseFormattingFrom, AddToRecentFiles); } 
+4
source share
1 answer

That's right. After the merge is complete, work with the Revisions collection to retrieve any changes.

+4
source

Source: https://habr.com/ru/post/1340212/


All Articles