My first Office Add-In
By Anatoly Mironov
Yesterday I participated in the Hackathon at European SharePoin Conference in Stockholm. The main goal was to learn more about Office Add-Ins. I wanted to create a very very simple app to learn the basics. Here in this post I’ll provide some links and describe the steps needed to start developing your Office Add-Ins. The Add-in I created is an Outlook Add-In, it is called “Joke Inserter” and with it you can insert a random Chuck Norris joke. It is just for fun, but it demonstrated how an add-in can be installed, made available in “New E-mail” and interact with the e-mail you are writing.
All the code is on github. The random jokes come from The Internet Chuck Norris Database. As I said, the jokes were just for fun, this add-in is of course, not a business app. During the hackathon I got help from Pretish Abraham, Jeremy Thake and … This is the result: Prerequisites
- Any OS, I happened to have Windows :)
- git, nodejs, npm (they should be in the $env:PATH)
Install following npm packages globally: [source language=“bash”] npm install -g tsd yeoman generator-office gulp [/source] Creating the Add-In Now with the yeoman support it is very easy: Create a folder and scaffold an app: [source language=“bash”] mkdir joke-inserter cd-joke-inserter yo office [/source] After that update the manifest file: Icon Url, and Support Url Start the application on localhost: [source language=“bash”] gulp serve-static [/source] Go to your Outook.office365.com. Click on Manage Apps and add the manifest file from your solution. I uploaded this app on azure: https://kultar.azurewebsites.net/appcompose/home/home.html. You can try this app by installing the manifest file in you Outlook client. Now when one is done with that simple fun add-in, it is very easy to go ahead and create real add-ins that provide value to you and your colleages. Resources: