none
Outlook Add-in does not load specifically for Outlook 2016 on Windows RRS feed

  • Question

  • I am making an Add-in for outlook, and it works on every client except for the Outlook 2016 app for Windows (10).  Initially it was working in the Mac version, but now it won't work there either.  I've followed a lot of examples, and it looks like all my initialization code and manifest should be correct.  Still, I don't think it is initializing in Outlook 2016.

    I literally have no idea why it isn't working. 

    Is there any way to somehow debug into the Outlook App?  Or does anyone have any advice on how to get it to work?  

    For more information, I started my project from the yeoman generator (https://github.com/OfficeDev/generator-office) and am using Office UI Fabric React.  I am using the Office Javascript API as well.



    Wednesday, June 7, 2017 7:23 PM

Answers

  • Hi Deepak,

    I was able to figure it out at last!  I had some code that was doing 

    let Context: any;
    let Diagnostics: any;
    
    Context = Office.context;
    Diagnostics = Context.diagnostics;
    const hostPlatform = Diagnostics.host + '-' + Diagnostics.platform;

    but Diagnostics.host and Diagnostics.platform seems to not work on Outlook 2016 PC (whereas on the web it always returned a value).  I changed it to `const hostPlatform = OFfice.context.malbox.diagnostics.hostVersion` and that worked for me, as it returned a value I was actually initially looking for.

    Thank you for looking into this, it was definitely a tricky one, but there is no further action needed.

    Tuesday, June 13, 2017 10:01 PM

All replies

  • Hi Fond Developer,

    I try to check the issue and I find that you are using the Yeoman generator.

    generally we use visual studio to develop addin.

    I did not used this generator before.

    it is possible that some step not done properly or some steps missing in your approach.

    but I am not sure about that.

    so to provide you a better solution for your issue, I escalate this issue to senior engineer.

    they will try to look in to this issue and try to provide you helpful reply that can solve your issue.

    thanks for your understanding.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Thursday, June 8, 2017 7:53 AM
    Moderator
  • Hi Deepak,

    Thank you for your response.  Yes, I used the yeoman generator as it was recommended in the Add-in get started docs (https://docs.microsoft.com/en-us/outlook/add-ins/addin-tutorial).  Please let me know if I can provide any more information.

    Thanks

    Thursday, June 8, 2017 7:42 PM
  • In case it helps, I started from scratch and slowly added some code back in.  It broke on Outlook 2016 PC when I added code using the Office Javascript API. I am reading the userProfile and the to, from and cc fields off of emails.  I'm fairly certain it is this, as I did a bunch of testing around commenting out other parts, of the code to make sure no other libraries were messing with it (e.g. lodash), and as soon as I comment out any of the Office JS code the add in will run again on PC...
    Friday, June 9, 2017 8:48 PM
  • Hi Fond Developer,

    I will try to download the resources and try to create a project and make a test with it.

    as soon as I complete the test I will inform you about my testing result.

    Thanks for your understanding

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 13, 2017 6:38 AM
    Moderator
  • Hi Deepak,

    Thank you very much, I sincerely appreciate it.  The part where my code seems to start breaking is when I add calls to the Office-JS API inside the Office.initialize.  My code looks like this:

    let Context: any; // to help with TypeScript compiling
    let email: any;
    let userProfile: any; 
    
    Office.initialize = () => {
      $(document).ready(() => {
        email = Office.context.mailbox.item;
        userProfile = Office.context.mailbox.userProfile.emailAddress;
       // ...
       render(
          ...(whatever can be here)
       );
      });
    };

    Tuesday, June 13, 2017 6:22 PM
  • Hi Deepak,

    I was able to figure it out at last!  I had some code that was doing 

    let Context: any;
    let Diagnostics: any;
    
    Context = Office.context;
    Diagnostics = Context.diagnostics;
    const hostPlatform = Diagnostics.host + '-' + Diagnostics.platform;

    but Diagnostics.host and Diagnostics.platform seems to not work on Outlook 2016 PC (whereas on the web it always returned a value).  I changed it to `const hostPlatform = OFfice.context.malbox.diagnostics.hostVersion` and that worked for me, as it returned a value I was actually initially looking for.

    Thank you for looking into this, it was definitely a tricky one, but there is no further action needed.

    Tuesday, June 13, 2017 10:01 PM
  • Hi Fond Developer,

    from your last post I find that your issue is solved now.

    I suggest you to mark your last post as an answer.

    it will helpful for us to close this thread.

    also it will helpful to other community members who will face same issue like yours.

    they can get solution from your post.

    Regards

    Deepak


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, June 14, 2017 7:23 AM
    Moderator