• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 993
  • Last Modified:

_Application.CompareDocuments Method Visual Basic

Greetings,

 After using some SDK's, I have went and installed word on multiple computers. I could use the compare feature in word, but I have multiple documents 10 - 30 to compare. Looking to use _Application.CompareDocuments Method  to compare multiple documents and output a file with similarities. Is this possible? If so could you please help with code, I found some code on MSDN but I can't seem to get it to work correctly.

'Declaration
Function CompareDocuments ( _
	OriginalDocument As Document, _
	RevisedDocument As Document, _
	Destination As WdCompareDestination, _
	Granularity As WdGranularity, _
	CompareFormatting As Boolean, _
	CompareCaseChanges As Boolean, _
	CompareWhitespace As Boolean, _
	CompareTables As Boolean, _
	CompareHeaders As Boolean, _
	CompareFootnotes As Boolean, _
	CompareTextboxes As Boolean, _
	CompareFields As Boolean, _
	CompareComments As Boolean, _
	CompareMoves As Boolean, _
	RevisedAuthor As String, _
	IgnoreAllComparisonWarnings As Boolean _
) As Document
'Usage
Dim instance As _Application
Dim OriginalDocument As Document
Dim RevisedDocument As Document
Dim Destination As WdCompareDestination
Dim Granularity As WdGranularity
Dim CompareFormatting As Boolean
Dim CompareCaseChanges As Boolean
Dim CompareWhitespace As Boolean
Dim CompareTables As Boolean
Dim CompareHeaders As Boolean
Dim CompareFootnotes As Boolean
Dim CompareTextboxes As Boolean
Dim CompareFields As Boolean
Dim CompareComments As Boolean
Dim CompareMoves As Boolean
Dim RevisedAuthor As String
Dim IgnoreAllComparisonWarnings As Boolean
Dim returnValue As Document

returnValue = instance.CompareDocuments(OriginalDocument, _
	RevisedDocument, Destination, Granularity, _
	CompareFormatting, CompareCaseChanges, _
	CompareWhitespace, CompareTables, _
	CompareHeaders, CompareFootnotes, _
	CompareTextboxes, CompareFields, _
	CompareComments, CompareMoves, RevisedAuthor, _
	IgnoreAllComparisonWarnings)

Open in new window

0
-Geek
Asked:
-Geek
  • 2
1 Solution
 
aikimarkCommented:
Is this a VB.Net VSTO or a Word/VBA run time environment?
0
 
-GeekAuthor Commented:
Using VB.net
0
 
-GeekAuthor Commented:
figured it out
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now