MapiJournalBuilder Class

A journal entry (IPM.Activity, [MS-OXOJRNL]) to add to a folder of a PstWriter or to save as an .msg file.

public sealed class MapiJournalBuilder : MapiMessageBuilder

Example

var entry = new MapiJournalBuilder
{
    Subject = "Call with Bob",
    JournalType = "Phone call",
    JournalTypeDescription = "Phone call",
    Start = new DateTime(2026, 3, 2, 9, 0, 0, DateTimeKind.Utc),
    End = new DateTime(2026, 3, 2, 9, 25, 0, DateTimeKind.Utc),
    Companies = ["Contoso"],
    Contacts = ["Bob Smith"],
};
Assert.Equal(TimeSpan.FromMinutes(25), entry.Duration);

var item = Assert.IsType<MapiJournal>(MsgFile.Load(MsgFile.ToByteArray(entry)));
Assert.Equal("Phone call", item.JournalType);
Assert.Equal(TimeSpan.FromMinutes(25), item.Duration);
Assert.Equal(["Contoso"], item.Companies);
Inheritance
MapiMessageBuilder MapiJournalBuilder

Constructors

NameDescription
MapiJournalBuilder()Initializes a new instance of the MapiJournalBuilder class.

MapiJournalBuilder()

MapiJournalBuilder.cs

Initializes a new instance of the MapiJournalBuilder class.

public MapiJournalBuilder()

Properties

NameDescription
CompaniesGets or sets the names of the companies the activity is associated with.
ContactsGets or sets the names of the contacts the activity is associated with.
DocumentPostedGets or sets whether the document was sent by email or posted to a folder during the activity.
DocumentPrintedGets or sets whether the document was printed during the activity.
DocumentRoutedGets or sets whether the document was sent to a routing recipient during the activity.
DocumentSavedGets or sets whether the document was saved during the activity.
DurationGets the duration of the activity, the difference between its end and its start, in whole minutes.
EndGets or sets the date and time, in UTC, when the activity ended. It sets the duration when the start is set.
JournalTypeGets or sets the type of the activity, such as Phone call, Meeting or Microsoft Word.
JournalTypeDescriptionGets or sets the description of the type of the activity, as Outlook shows it.
StartGets or sets the date and time, in UTC, when the activity started. It sets the duration when the end is set.

Gets or sets the names of the companies the activity is associated with.

public IReadOnlyList<string>? Companies { get; set; }

Gets or sets the names of the contacts the activity is associated with.

public IReadOnlyList<string>? Contacts { get; set; }

DocumentPosted

MapiJournalBuilder.cs

Gets or sets whether the document was sent by email or posted to a folder during the activity.

public bool DocumentPosted { get; set; }

Property value

bool

DocumentPrinted

MapiJournalBuilder.cs

Gets or sets whether the document was printed during the activity.

public bool DocumentPrinted { get; set; }

Property value

bool

DocumentRouted

MapiJournalBuilder.cs

Gets or sets whether the document was sent to a routing recipient during the activity.

public bool DocumentRouted { get; set; }

Property value

bool

Gets or sets whether the document was saved during the activity.

public bool DocumentSaved { get; set; }

Property value

bool

Gets the duration of the activity, the difference between its end and its start, in whole minutes.

public TimeSpan? Duration { get; }

Property value

TimeSpan?

Gets or sets the date and time, in UTC, when the activity ended. It sets the duration when the start is set.

public DateTime? End { get; set; }

Property value

DateTime?

Gets or sets the type of the activity, such as Phone call, Meeting or Microsoft Word.

public string? JournalType { get; set; }

Property value

string?

JournalTypeDescription

MapiJournalBuilder.cs

Gets or sets the description of the type of the activity, as Outlook shows it.

public string? JournalTypeDescription { get; set; }

Property value

string?

Gets or sets the date and time, in UTC, when the activity started. It sets the duration when the end is set.

public DateTime? Start { get; set; }

Property value

DateTime?