Add Ins Connectors REST APIs Actionable Messages Feedback Blog Code Samples Videos

Outlook Add-in Code Samples

Note: Some of the following samples were generated with Visual Studio, but not all of them require Visual Studio to function. In most cases, there is no compiled output, only HTML, CSS, and JavaScript files. These files can be edited with any text editor, and only need to be uploaded to a web server to be used.

Add-in Command Demo

Keywords: commands, function, menu, taskpane read mode, compose mode

The Add-in Command Demo add-in uses the commands model for Outlook add-ins to add buttons to the ribbon. This sample demonstrates the different types of buttons that an add-in can implement.

Microsoft Outlook Add-in BillMaker

Keywords: commands, function, menu, taskpane read mode, compose mode

This Outlook add-in demonstrates how to implement three types of command buttons: a button with a drop-down menu (each of which launches a task pane), a button that launches a task pane, and a button that runs a function that uses no task pane UI. The app appears when you open an existing appointment or meeting and allows you to create and send invoices to clients with whom you've met.

Translator Add-in

Keywords: commands, function, compose mode

The Translator add-in uses the commands model (Outlook 2016 only) for Outlook add-ins to add a button to the ribbon in the new message form. For other clients, the add-in uses the standard add-in UI to implement the same functionality. The add-in sends the selected text from the message body to a translator web service to translate from English to Russian.

Hello World Add-in

Keywords: compose mode, read mode

This is a simple mail add-in for Outlook that activates in both read forms and compose forms for mail and appointments. It's based on the starter project that Visual Studio 2013 creates when you select the App for Office project template.

Link Revealer Add-in

Keywords: entities, read mode

This Outlook add-in demonstrates how to find and parse all links in the body of an email.

AttachmentsDemo Add-in

Keywords: attachments, REST, read mode

The sample implements a read-mode mail app that activates for items with attachments. It allows the user to save all attachments to their OneDrive for Business. It implements a WebAPI to retrieve attachments via a callback token, and uses the Files REST API to save to OneDrive.

Forward Email Add-in

Keywords: EWS, read mode

This sample app shows how to use JavaScript and Exchange Web Services in an add-in for Outlook to forward the current mail items to a list of user-defined email addresses, and optionally to include user-defined comments with the forwarded email.

ScanForMe Add-in

Keywords: read mode

This Outlook add-in checks whether the user is mentioned on the To line, cc line or body of an email.

Custom Properties Add-in

Keywords: custom properties, read mode

This sample shows how to set a property on an email message and then store that property on your Exchange server so that you can retrieve it the next time the item is returned.

Identity Token Add-in

Keywords: identity token, read mode

Shows how to use a client token from the Exchange server to provide authentication for users of a mail add-in for Outlook.