MapiNoteBuilder Class
A sticky note (IPM.StickyNote, [MS-OXONOTE]) to add to a folder of a PstWriter or to save as an .msg file.
public sealed class MapiNoteBuilder : MapiMessageBuilderExample
using (var writer = PstWriter.Create(stream, leaveOpen: true))
{
var notes = writer.RootFolder.CreateFolder("Notes", "IPF.StickyNote");
notes.AddItem(new MapiNoteBuilder
{
Text = "Call Bob\r\nAbout the quarterly report",
Color = MapiNoteColor.Green,
Width = 200,
Height = 166,
});
}
using var file = PstFile.Open(stream);
var note = Assert.IsType<MapiNote>(file.GetFolder("Notes")!.EnumerateItems().Single());
Assert.Equal("Call Bob", note.Subject);
Assert.Equal("Call Bob\r\nAbout the quarterly report", note.Body);
Assert.Equal(MapiNoteColor.Green, note.Color);
Assert.Equal(200, note.Width);- Inheritance
MapiMessageBuilderMapiNoteBuilder
Constructors
| Name | Description |
|---|---|
| MapiNoteBuilder() | Initializes a new instance of the MapiNoteBuilder class. |
MapiNoteBuilder()
MapiNoteBuilder.csInitializes a new instance of the MapiNoteBuilder class.
public MapiNoteBuilder()Properties
| Name | Description |
|---|---|
| Color | Gets or sets the background color of the note. |
| Height | Gets or sets the height of the window of the note, in pixels. |
| Left | Gets or sets the distance, in pixels, from the left edge of the screen to the window of the note. |
| Text | Gets or sets the text of the note. It sets the subject too: Outlook shows the first line of the text as the subject ([MS-OXONOTE] 2.2.1.4). |
| Top | Gets or sets the distance, in pixels, from the top edge of the screen to the window of the note. |
| Width | Gets or sets the width of the window of the note, in pixels. |
Color
MapiNoteBuilder.csGets or sets the background color of the note.
public MapiNoteColor Color { get; set; }