CompareOptions.IgnoreHeadersAndFooters

CompareOptions IgnoreHeadersAndFooters property. True indicates that headers and footers content is ignored.

CompareOptions.IgnoreHeadersAndFooters property

True indicates that headers and footers content is ignored.

public bool IgnoreHeadersAndFooters { get; set; }

Remarks

By default headers and footers are not ignored.

Examples

Demonstrates how to compare two documents from streams using customized CompareOptions.

CompareOptions options = new CompareOptions();
options.IgnoreFormatting = true;
options.IgnoreHeadersAndFooters = true;

using (Stream v1 = File.OpenRead(MyDir + "CompareV1.docx"))
using (Stream v2 = File.OpenRead(MyDir + "CompareV2.docx"))
using (Stream output = File.Create(ArtifactsDir + "CompareStreams.docx"))
{
    Comparer.Compare(v1, v2, output, SaveFormat.Docx, "Wordize", DateTime.Now, options);
}

See Also