// The path to the documents directory. string dataDir = RunExamples.GetDataDir_LoadingAndSaving(); // Initialize OneNote document Document doc = new Document(); Aspose.Note.Page page = new Aspose.Note.Page(doc); // Default style for all text in the document. ParagraphStyle textStyle = new ParagraphStyle { FontColor = Color.Black, FontName = "Arial", FontSize = 10 }; page.Title = new Title(doc) { TitleText = new RichText(doc) { Text = "Title text.", ParagraphStyle = textStyle }, TitleDate = new RichText(doc) { Text = new DateTime(2011, 11, 11).ToString("D", CultureInfo.InvariantCulture), ParagraphStyle = textStyle }, TitleTime = new RichText(doc) { Text = "12:34", ParagraphStyle = textStyle } }; doc.AppendChildLast(page); dataDir = dataDir + "CreateOneNoteDocAndSaveToHTML_out.html"; // Save as HTML format doc.Save(dataDir);