Create your first Microsoft Office add-in with the Outlook JavaScript APIs
Objective
Scenario
Virtual Machines
- QSC 1511 Master
Exercise 1 : Create a new Outlook add-in project
In this lab, you will use Visual Studio to create your first Outlook add-in using the Outlook JavaScript APIs. The add-in will allow the user to translate parts of a message they are composing into different languages.
- Launch Visual Studio 2015 as administratorRight click Visual Studio 2015 on the task bar and select Run as Administrator.
- Create a new projectFrom the File menu select the New Project command. Expand Templates, Visual C#, Office/SharePoint ,Web add-ins. Select Outlook Add-in. Name the project Translator and click OK. Complete the creation with defaults
- Run the appPress F5 to begin debugging.
- Use the supplied credentialsWhen prompted, enter the email address and password of your Office 365 account. Visual Studio will install the add-in for that user.
- Open Outlook 2016With the app running, open Outlook 2016 and log on to the user's mailbox. You should see a Display all properties button on the ribbon when you select or open a message.Note that if this is the first time you are running Outlook on that box you need to go through the typical Outlook configuration to connect to Exchange
Exercise 2 : Add buttons to the new message ribbon
In this exercise you will add a button to translate text to Latin and a button to open a task pane, allowing the user to select start and end languages.
- Open Translator.xmlOpen the Translator/TranslatorManifest/Translator.xml file.
- Add the translator buttonLocate the following line:
Insert the following after that line:(copy the below and paste into the virtual machine) - Add the Translate to Latin buttonReplace the line with the following: (copy the below and paste into the virtual machine)
- Add the More Options buttonReplace the