In this post I will walk you guys through my first outlook app, the app functionality is simple. The app displays Yammer groups from your network and you can add them to the message recipient to post a group update from outlook.
let's go straight to the implementation steps:
- Open VS and create new project, select apps for office, enter the name of your app
- In Choose app type, select Mail and click Next
- Check compose form for Email message as our app will use outlook compose message to create a Yammer post to a specific Yammer Group
- 2 projects will be created for you the mail app and the we project contains Home html which appears when you choose your app in the compose form.
- In the generated home.html replace the generated html with the below HTML , which as you can see is a simple drop down list and a button
- Don't forget to add reference to Yammer JS SDK, you might need to create an app to set the data-app-id attribute of the Yammer script tag, to learn how to create a Yammer App use this link
- As you can see from the below screenshot I've added my app, after registering your app you can get the client id value which is used to set the script tag data-app-id attribute
- In the generated Home.js file let's add some javascript code block to
- Ensure user login
- Authorize the app to access your Yammer Groups
- Retrieve your account's Yammer group list
- In the document ready we call a function to ensure login and add groups to the drop down list
- When the user clicks the add Yammer group to recipient the Yammer group email address will be added to the To allowing the user to post the message to specific Yammer group within the outlook context
Watch complete demonstration video
here, download the sample code from MSDN
here
Happy SharePointing!