There is an example solution on GitHub. In this example, JavaScript and HTML are used. Here is an example of the JavaScript that pulls data from the selected email:
Office.initialize = function (reason) {
$(document).ready(function () {
app.initialize();
loadProps();
});
};
function loadProps() {
var item = Office.context.mailbox.item;
$('#dateTimeCreated').text(item.dateTimeCreated.toLocaleString());
$('#dateTimeModified').text(item.dateTimeModified.toLocaleString());
$('#itemClass').text(item.itemClass);
$('#itemId').text(item.itemId);
$('#itemType').text(item.itemType);
if (item.itemType == Office.MailboxEnums.ItemType.Message){
loadMessageProps(item);
}
else {
loadAppointmentProps(item);
}
}
This is then linked to a HTML page to display the data. In order to add this to Outlook, there is also an XML manifest file. This tells outlook where to find the pages, here is a snippet of the file:
<Requirements>
<bt:Sets DefaultMinVersion="1.3">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Message read form -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<OfficeTab id="TabDefault">
<Group id="msgReadDemoGroup">
<Label resid="groupLabel" />
<Tooltip resid="groupTooltip" />
<!-- Task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Tooltip resid="paneReadButtonTooltip" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="green-icon-16" />
<bt:Image size="32" resid="green-icon-32" />
<bt:Image size="80" resid="green-icon-80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="readTaskPaneUrl" />
</Action>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
Hope this helps others as it helped me.