none
Need Link to download Office 2016 tools for Visual studio 2015 RRS feed

  • Question

  • I am working on creating a add-in for outlook. This add-in target version of outlook is outlook 2016. I am currently using VSTO tools for Office 2013 to create this add-in. However, I want to target Outlook 2016. Can anyone share the link to download the VSTO for Office 2016.

    Please note that I have tried Office tools for Visual studio 2015 preview version but this has not helped me in solving the issue I am facing.

    My issue is when I create a appointment in Outlook 2016, I can select Body format text of the meeting to either Text, HTML or Rich Text format from Ribbon.

    But I am not able to programmatically access this body format values, I assume the issue is since I am using VSTO for office 2013.

    Thanks for your help in advance.

    Tuesday, December 29, 2015 12:39 PM

All replies

  • Hello Avinash,

    See http://aka.ms/GetLatestOfficeDevTools . But I don't think the issue is related to the VSTO version at all.

    The fact is that AppointmentItem class provides the RTFBody property which returns a Byte array that represents the body of the Microsoft Outlook item in Rich Text Format. For example, you can use the following code to get the value:

    private void GetRTFBodyForAppt()
    {  
     if (Application.ActiveInspector().CurrentItem is Outlook.AppointmentItem)  
     {  
       Outlook.AppointmentItem appt =  
       Application.ActiveInspector().CurrentItem as Outlook.AppointmentItem;  
       byte[] byteArray = appt.RTFBody as byte[];  
       System.Text.Encoding encoding = new System.Text.ASCIIEncoding(); 
     
       string RTF = encoding.GetString(byteArray);  
       Debug.WriteLine(RTF);  
      }  
    } 

    Also you can use the Body property which returns a String representing the clear-text body of the Outlook item.

    But you will not find the HTMLBody property for appointment items in OOM. Use the RTFBody property instead.

    Tuesday, December 29, 2015 12:51 PM
  • Hi Eugene,

    Thanks for your quick reply.

    I am using in built word document to add formatted text  like html tags etc to meeting body. The problem I am having is the formatted text that is added to word document of meeting is getting lost when the meeting email is received by end user.

    The same scenario will not occur when I use Outlook 2013 to create meeting with formatted text(like HTML text). The end user is able to get the formatted text that was added when meeting is created.

    I believe the cause of this issue is that in Outlook 2016, meeting item body format can be changed between text, HTML and RichText similar to emails.

    But I am not able to set this value programmatically using Code.

    Let me know if my understanding is wrong again.

    Tuesday, December 29, 2015 1:47 PM
  • The Outlook 2016 Object Model doesn't provide anything new for that. You are on the wrong avenue.

    Do you have any other add-in running in Outlook?

    Tuesday, December 29, 2015 2:23 PM
  • hi Eugene,

    Thank you for the reply.

    Yes there are other addins running outlook and all those add ins are default add ins that come with outlook.

    I will try to find another way to overcome this issue

    Tuesday, December 29, 2015 5:03 PM
  • >>>I believe the cause of this issue is that in Outlook 2016, meeting item body format can be changed between text, HTML and RichText similar to emails.

    According to your description, I suggest that you could make sure whether get the formatted text when opened this appointment, after you select HTML and edit the formatting then save and close the appointment.

    Friday, January 1, 2016 9:03 AM