Building an Office add-in with Angular 2

This is a sample project showing how to get started building Office add-ins with Angular 2 and Office UI Fabric. The sample is written in TypeScript and can be run from Visual Studio or Visual Studio Code.

C# (2.2 MB)
5 Star
1,689 times
Add to favorites
E-mail Twitter Digg Facebook
Sign in to ask a question

  • How to use AddHandlerAsync on binding
    1 Posts | Last post June 21, 2017
    • Hi JayChase,
      I found your example very helpful.  However, when I went to add an event handler on data changes for the binding:
      createHandlerOnA1(): Promise<IOfficeResult> {
              return new Promise((resolve, reject) => {
              this.binding.addHandlerAsync(Office.EventType.BindingDataChanged, this.changeEvent, (handlerResult: Office.AsyncResult) => {
                          if(handlerResult.status === Office.AsyncResultStatus.Failed) {
                                  error: 'failed to set a handler'
                          } else {
                              // Successful 
                                  success: 'successfully set handler'
      The handler method, 'this.changeEvent', cannot seem to access functions within the component.  It can only call Office JS methods.  Do you have any experience regarding this?  Thanks!
  • Outlook addin
    1 Posts | Last post November 23, 2016
    • Do you have any example for outlook addin? I tried to create an outlook addin by following your example but couldn't make it work. Thanks.
  • Mac?
    2 Posts | Last post November 18, 2016
    • Hi
      will this work on Mac?
    • It will work on Mac and Office Online too