this repo exists becasue all of the addin tutorials use node with the Yeoman generator(yo office) and it doesnt make sense when you're creating something simple, it also doesnt do a good job of illustrating how addins work
this addin currently only works with outlook desktop and owa
- web server capable of serving static html files
- a domain and an accompanying ssl certificate
- clone the this repo
- update
manifest.xmlId: generate a uuid for your appProviderName: you or your businesses nameDisplayName: choose a name for your addinDescription: tell the world what the addin does- update all of the urls(localhost has not been tested)
- replace anywhere it says
https://localhost:3000with your domain and path to the root of your web server
- replace anywhere it says
- make a
.tarof the contents of the src file only, namedoffice-addin.tar - copy the tar to your domains web root
scp C:\path\to\local\file\office-addin.tar user@ipa.dd.res.ss:/var/www/domain.com/html
- unpack the contents of the tar into your web root
tar -xvf /var/www/domain.com/html/office-addin.tar -C /var/www/domain.com/html
- remove the tar
rm /var/www/domain.com/html/office-addin.tar
- update permissions of all files and folders
find /var/www/domain.com/html -type f -exec chmod 644 {} \;find /var/www/domain.com/html -type d -exec chmod 755 {} \;- the final result should look like this
/var/www/domain.com/html/assets/var/www/domain.com/html/commands/var/www/domain.com/html/taskpane/var/www/domain.com/html/favicon.ico
- side loading the addin(full details on sideloading on ms learn)
- outlook desktop(windows): click
file>manage addinsand it will open a link to your addins page - outlook for web(owa): go to https://aka.ms/olksideload
- outlook desktop(windows): click
- reopen outlook and your addin should be working
- us https://aka.ms/olksideload to remove the addin when you're done
anything with an * indicates they are particularly helpful
- what is an addin
- first tutorial
- official office dev repo
- *outlook tutorials on office dev repo
- *git the gist(composing messages)
- all about the manifest
- *manifest spec
- *how to specify support for different applications
- apply shortcuts within excel
- auto-open task pane
these are my(likely flawed) understanding, not the official word of msft
- Id: any unique uuid so your app can be identified
- Host>Hosts: specify which apps you want to be compatible
- Requirements>Sets>Set: defines the minimum version requirements for the office app as a whole
- this should be the absolute bare minimum, any later versions or additional features should be defined in VersionOverrides
- FormSettings: defines entrypoint for old outlooks, ignored when using VersionOverrides
- VersionOverrides: container for elements that define host specific behaviour, or changes from the base behaviour of the addin
- VersionOverrides>Hosts>Host: specify additional apps and configurations for each
- VersionOverrides>DesktopFormFactor/MobileFormFactor/AllFormFactors(only custom functions): defines which type of device the contents works on
- this is where the fun begins, define each app and its configurations here
- VersionOverrides>Resources: specifies text and links that refer to files and content shared across hosts
display a message at the top of the email
Office.context.mailbox.item.notificationMessages.addAsync("myErrorNotification", {
type: "errorMessage",
message: `working to insert text sample`
}, function(result) {
// do nothing
});in order to run on localhost you must configure ssl certs for localhost
note: when this project first began the documentation for this was terrible. i did see some additional resources online so maybe its better now
- create an npm project
- run
npm install office-addin-dev-certs - register BOTH certs in edge
- more info on here on stackoverflow
- these are for chrome but its essentially the same in edge
- reference BOTH certs in your server file
- dependencies: body-parser, cors, express, office-addin-dev-certs
- OfficeDev/generator-office#490
- OfficeDev/Office-Addin-Scripts#199
- https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/hello-world/outlook-hello-world#configure-a-localhost-web-server-and-run-the-sample-from-localhost