Monday, March 20, 2017

Create your first Microsoft Office add-in with the Outlook JavaScript APIs

Create your first Microsoft Office add-in with the Outlook JavaScript APIs

Objective

Scenario

Virtual Machines

  1. 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.
  1. Launch Visual Studio 2015 as administrator
    Right click Visual Studio 2015 on the task bar and select Run as Administrator.
  2. Create a new project
    From 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
  3. Run the app
    Press F5 to begin debugging.
  4. Use the supplied credentials
    When prompted, enter the email address and password of your Office 365 account. Visual Studio will install the add-in for that user.
  5. Open Outlook 2016
    With 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.
  1. Open Translator.xml
    Open the Translator/TranslatorManifest/Translator.xml file.
  2. Add the translator button
    Locate the following line:

    Insert the following after that line:(copy the below and paste into the virtual machine)





  3. Add the Translate to Latin button
    Replace the line with the following: (copy the below and paste into the virtual machine)


No comments: