Page.PageContentRevisionSummary property

Gets or sets the revision summary for the page and it’s child nodes.

public RevisionSummary PageContentRevisionSummary { get; set; }


Shows how to edit page’s meta information.

// The path to the documents directory.
string dataDir = RunExamples.GetDataDir_Pages();

// Load OneNote document and get first child           
Document document = new Document(dataDir + "");
Page page = document.FirstChild;

// Reading Content Revision Summary for this page
var pageRevisionInfo = page.PageContentRevisionSummary;

    pageRevisionInfo.LastModifiedTime.ToString("dd.MM.yyyy HH:mm:ss")));

// Update Page Revision Summary for this page
pageRevisionInfo.AuthorMostRecent = "New Author";
pageRevisionInfo.LastModifiedTime = DateTime.Now;

document.Save(dataDir + "");

Shows how to check if a page is a conflict page(i.e. it has changes that OneNote couldn’t automatically merge).

string dataDir = RunExamples.GetDataDir_Pages();

// Load OneNote document
Document doc = new Document(dataDir + "", new LoadOptions { LoadHistory = true });

var history = doc.GetPageHistory(doc.FirstChild);
for (int i = 0; i < history.Count; i++)
    var historyPage = history[i];
    Console.Write("    {0}. Author: {1}, {2:dd.MM.yyyy}",
    Console.WriteLine(historyPage.IsConflictPage ? ", IsConflict: true" : string.Empty);

    // By default conflict pages are just skipped on saving.
    // If mark it as non-conflict then it will be saved as usual one in the history.
    if (historyPage.IsConflictPage)
        historyPage.IsConflictPage = false;

doc.Save(dataDir + "", SaveFormat.One);

See Also