outlook-addin

C# How to get the send of behalf email address in outlook add-in

邮差的信 提交于 2019-12-05 06:00:49
I'm trying to get the sender email address from email that is send using another email address. The sender as shows in outlook is ditribution-lists@domain.com on behalf of User Name [user.name@domain.com]. The MAPI object has a method SentOnBehalfOfName that returns "User Name" but not the email address. Does anyone know how to receive user.name@domain.com field? using System; using System.Runtime.InteropServices; using System.Diagnostics; using System.Reflection; namespace Helpers { internal class EmailHelper { public static string GetSenderEmailAddress(Microsoft.Office.Interop.Outlook

EWS request not responding with error on Mac

旧巷老猫 提交于 2019-12-05 05:42:39
问题 In our Outlook add-in, we are using makeEwsRequestAsync to get the current email's MimeContent . We understand there is a 1MB request/response limit when using EWS via the JavaScript API. When we reach this limit on Windows, we at least see this message: "Response exceeds 1 MB size limit. Please modify your EWS request". However, when making this request for a large email (>1MB) on Mac (Outlook 2016), we don't get any sort of response whatsoever. The add-in just seems to hang. Is there any

Retrieve Current Email Body In Outlook

孤者浪人 提交于 2019-12-05 04:25:33
in my outlook addin I want to add a button on the Ribbon so when user click this button I want to retrieve the current selected email's body , I have this code but it retrieve only the first email from the inbox because the index is 1 : Microsoft.Office.Interop.Outlook.Application myApp = new Microsoft.Office.Interop.Outlook.Application(); Microsoft.Office.Interop.Outlook.NameSpace mapiNameSpace = myApp.GetNamespace("MAPI"); Microsoft.Office.Interop.Outlook.MAPIFolder myInbox = mapiNameSpace.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderInbox); String body = (

Can't find the list of most (all?) tab names for the ribbon in Office

一世执手 提交于 2019-12-05 01:18:33
问题 After some heavy googling, I've concluded that I'm unable to locate information on the id names for the different components of the ribbon in Office. For instance, even though the following XML works, I need to hide the add-in error display due to TabMail being at fault when a new email is being created. It's my understand that it's because I currently target all windows in Outlook but should be only targeting the main one. When a new email is being created, my add-in tries to insert itself

Tag Outlook MailItem with ID number before send without causing TNEF (RTF) send

北城以北 提交于 2019-12-04 23:27:17
I have an Outlook add-in which assigns a UserProperty to a MailItem before it is sent: Outlook.UserProperty prop = mail.UserProperties.Add("XXXX", Outlook.OlUserPropertyType.olText); prop.Value = "YYYY"; It is known (see Stop Outlook from converting HTML to RTF for example) that doing this causes the email to be sent using TNEF (ie RTF format, the dreaded winmail.dat). My question is, is it safe to simply un-set the TNEF property? The following code will do that: mail.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/id/{00062008-0000-0000-C000-000000000046}/8582000B", false);

Hooked events Outlook VSTO continuing job on main Thread

橙三吉。 提交于 2019-12-04 22:38:32
I have developed an Outlook VSTO addin. Some tasks should be made on a background thread. Typically, checking something in my local db or invoking a web request. After reading several posts, I dropped the idea of calling the Outlook Object Model (OOM) in a background thread. I have some wpf controls and I successfully managed to use the .NET 40 TPL to perform the async task and when completed to "finish" the job (i.e. accessing the UI or the OOM) in the Main VSTA Thread. To do so I use a syntax of the form: Task<SomeResult> task = Task.Factory.StartNew(()=>{ //Do long tasks that have nothing

Office outlook web(AddIn) dowloand message file

心已入冬 提交于 2019-12-04 21:07:03
Hei Iam developing Outlook web addIn in which i want to access all the data of email ,Senderemail, receipent email ,subject and sent date etc. I also want to download the entire message file .I have found one outlook web REST api https://msdn.microsoft.com/en-us/office/office365/api/mail-rest-operations#GetMessage but dont know how to use it. Anyone has experience with that ? If anyone can share any example it would be helpful Thanks 1 . To get the message details you can use the javascript APIs available in office.js. Refer the link for details on individual APIs that are available on an item

Getting the version and platform of Office application from Windows Registry

女生的网名这么多〃 提交于 2019-12-04 20:24:45
I'm working on a Inno Setup installer for an MS Office Add-In and trying to find a way to get the version and target platform (bitness) of Excel and Outlook, preferably from the Windows Registry. Although some unofficial sources list some methods to extract version information from the Windows Registry, that information appears to be unreliable. Does anyone know if there is a reliable (and official) way to get version and platform information from the version of Office (and associated programs such Excel or Outlook) that is currently installed? Based on the answers by @Slava Ivanov and @MB. ,

Keep Outlook mailItem property (internet header) from being removed when forwarded/replied

懵懂的女人 提交于 2019-12-04 19:03:12
I'm trying to start up a thread of mails defined by the same ID (ID needs to be a specific value equal to the one in our database). I can assign a custom internet header just fine like this: sendMail.PropertyAccessor.SetProperty("http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/DCPID", taskId); Where the sendMail is an olMailItem and taskId is the id needed. When this mail is sent and recieved I can get my ID with the GetProperty method but when forwarded or replied the internet header gets removed and I can't access this property anymore. Is there a way to keep

How do i specify X-Headers for outgoing emails in Microsoft Outlook 2010

折月煮酒 提交于 2019-12-04 18:44:22
I need to include custom headers in my outgoing emails. I'm using Microsoft Outlook 2010 and SendGrid SMTP server. In particular, i want to specify a unique tracking ID on each mail using SendGrid's X-SMTPAPI header. My Approach: I am build an Outlook Add-In that will intercept outgoing emails and add the required headers Outlook.Application object has an ItemSend event that serves this purpose. How do i use Mail.PropertyAccessor.SetProperty to set the custom headers? I am unable to find the correct header identifier that points to x-headers, or that will allow me set custom headers. Your help