locked
Word comparator does not work for headers and footers RRS feed

  • Question

  • I am comparing two word files. It's comparing everything except headers and footers. Anyone any idea? Is there any limitation of word comparator?
    Thursday, November 17, 2011 5:50 AM

Answers

  • Hi You need to set the CompareHeaders and CompareFooters prpoerty to True For example

    Sub CompareDoc()
    
    Dim oDoc1 As Document
    Dim oDoc2 As Document
    
    Set oDoc1 = Documents.Open("D:\Changed Header.doc")
    Set oDoc2 = Documents.Open("D:\Original Header.doc")
    Application.CompareDocuments oDoc1, oDoc2, wdCompareDestinationNew, , , , , , True, True
    
    End Sub
    


    Cheers Shasur


    http://www.vbadud.blogspot.com http://www.dotnetdud.blogspot.com

    • Edited by Shasur Thursday, November 17, 2011 9:39 AM
    • Proposed as answer by danishani Saturday, January 28, 2012 5:56 AM
    • Marked as answer by danishani Wednesday, February 1, 2012 5:32 AM
    Thursday, November 17, 2011 9:37 AM