outlook-addin

Outlook Ribbon Load Inspector.CurrentItem is null

…衆ロ難τιáo~ 提交于 2019-12-12 17:29:12
问题 Overview I have an Outlook add-in created with VSTO. The add-in has a single ribbon (visual designer) for the Mail.Compose ribbon type. The ribbon tab ControlIdType is set to "Custom". The only code in the add-in other than designer code is the following Load handler for the ribbon. this.Context.CurrentItem is unexpectedly returning null. Code private void RibbonComposeMail_Load(object sender, RibbonUIEventArgs e) { try { var inspector = this.Context as Outlook.Inspector; if (inspector ==

Is there any way to change custom task pane color in VSTO outlook add in?

我与影子孤独终老i 提交于 2019-12-12 17:19:08
问题 Is there any way to change custom task pane background color in mail compose window ? UPDATE UserControl.BackColor gives me this result. But I want whole custom task pane to be white My code for setting up usercontrol is here: public partial class UserControlTest : UserControl { public UserControlTest() { this.BackColor = Color.White; InitializeComponent(); } } 回答1: You can change the background of the task panel by setting the BackColor of the UserControl . This is how I set mine to the same

Outlook Object Model - Hooking to the Conversation Cleanup Feature

主宰稳场 提交于 2019-12-12 14:43:25
问题 Outlook 2010 has a feature called Convesation Cleanup . This feature is implemented using the Conversation Header Outlook Object Model. I would like to hook to this call and perform an action when triggered, yet I can't figure out how to catch it/hook on to it. Is anyone aware if this is possible? If its not, are you aware of any way around it? I have tried using outlook spy to view the event log when executing 'conversation cleanup' with no luck (nothing logged)... is there anyway of viewing

Cannot Access Shared Contacts Folder In Outlook 2010 VB.Net

独自空忆成欢 提交于 2019-12-12 13:51:55
问题 Im creating outlook add-in and I am having problems getting into Shared folder using vb.net. I have tried contactsFolder = ns.Folders.Item("Shared Contacts") and contactsFolder = ns.Folders.Item("Public Folders") still have no way of accessing it. can someone help me please. I keep getting error: The attempted operation failed. An object could not be found. 回答1: Since you are using a shared folder, the folder must not exist in the default Store. You probably need to enumerate Session.Stores (

Crm 2011 outlook client - Set regarding mandatory

╄→гoц情女王★ 提交于 2019-12-12 13:39:49
问题 Our client is using Microsoft CRM 2011 outlook client and they have a unique business need. They want to make the "Set Regarding" mandatory for all of their employees using outlook to send emails (Weird huh?). If a user while sending the email forget to set regarding, outlook should display a notification message and shouldn't let the user send the email. I have not been able to find any out of the box feature for this so I decided to write an outlook addin. Is there a way to know in outlook

PR_INTERNET_MESSAGE_ID returns blank when sending message

假装没事ソ 提交于 2019-12-12 09:59:12
问题 I'm developing add-in for Outlook 2013,I'm struggling with PR_INTERNET_MESSAGE_ID , I could easily get PR_INTERNET_MESSAGE_ID on archiving incoming mails, but it returns nothing on sending mail. Any help would be appreciated! Thank you! here is my code string PR_INTERNET_MESSAGE_ID = "http://schemas.microsoft.com/mapi/proptag/0x1035001F"; Microsoft.Office.Interop.Outlook.PropertyAccessor pal = mailItem.PropertyAccessor; string Internet_Message_Id = pal.GetProperty(PR_INTERNET_MESSAGE_ID)

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

吃可爱长大的小学妹 提交于 2019-12-12 09:38:45
问题 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? 回答1: using System; using System.Runtime.InteropServices; using System.Diagnostics; using System.Reflection; namespace Helpers {

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

最后都变了- 提交于 2019-12-12 09:25:32
问题 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

How to open Outlook's new mail window with prepopulated attachment

↘锁芯ラ 提交于 2019-12-12 07:29:50
问题 I need to open a new email window with a prepopulated attachment when a user clicks some button or link in my application. 回答1: Old question, but I also ran in to this so here's a copy and paste solution: Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application(); Microsoft.Office.Interop.Outlook.MailItem oMsg = (Microsoft.Office.Interop.Outlook.MailItem)oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem); oMsg.Subject = "subject

Enable Tab Key in my Web Browser Control

荒凉一梦 提交于 2019-12-12 06:37:30
问题 I have a web browser control in a custom task pane control (User Control) and I open it as a sidebar as soon as my Outlook opens (I have created it as an Outlook Addin using Visual Studio 2013). The web browser control has a login form inside it and I would like to place focus on an input control in my web browser control as soon as Outlook opens. I have tried several tricks like placing focus on the custom user control and then placing focus on the input control after the form has loaded but