outlook-addin

The type 'UserControl' does not support direct content

孤街醉人 提交于 2019-12-03 00:53:53
I have an Outlook 2013 and 2016 VSTO Add-in project and am trying to add a WPF user control to a custom task pane as described here . The problem I have is when I add the User Control (WPF) it generates me a WPF control with a grid, but automatically throws an error of "The type 'UserControl' does not support direct content". WPF generated: <UserControl x:Class="TestNamespace.UserControl1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http:/

Change organizer of outlook AppointmentItem via VSTO

随声附和 提交于 2019-12-02 17:41:55
问题 I am trying to create set of AppointmentItems from database in Outlook via an add-in I have developed. I would like to be able to create AppointmentItems on another exchange account's calendar(I have the credentials of it). The organizer attribute of AppointmentItem is read-only, it did not help. I was just wondering whether there is any way to achieve this. I am using Outlook 2010 and Visual Studi 2010 Many thanks for your help. Regards 回答1: My understanding is that if you want to change the

Shared Add-ins for Outlook 2007 Capturing ReplyToAll Event

南楼画角 提交于 2019-12-02 16:18:21
问题 I am using VS 2010 & Dot Net Framework 2.0. I have created a project in Extensibility->Shared Add-ins for Outlook. I am trying to capture ReplyToAll Event it is not getting fired. Please look the below code: OnConnection Method inspectors = applicationObject.Inspectors; inspectors.NewInspector += new Outlook.InspectorsEvents_NewInspectorEventHandler(inspectors_NewInspector); void inspectors_NewInspector(Microsoft.Office.Interop.Outlook.Inspector Inspector) { mailItem = null; try { Outlook

Create MSI file from c# outlook addin in VS 2013

拜拜、爱过 提交于 2019-12-02 14:38:03
问题 I have c# outlook addin created in visual studio 2013. It has windows forms also. I am getting mad on generating msi file, any easier solution/steps for me, please ? Mainly tell me, after completing the process, where do I find the final MSI file (like bin/release folder) ? I installed this - https://visualstudiogallery.msdn.microsoft.com/9abe329c-9bba-44a1-be59-0fbf6151054d as well as installshield limited edition installer. I was able to build it and ran the installation file(.exe) from

Outlook Redemption - using RedemptionLoader without regsvr32 the DLL

随声附和 提交于 2019-12-02 13:19:52
I want to use the mail functions without registering the COM dll (regsvr32). I followed the informations from: http://www.dimastr.com/redemption/security.htm#redemptionloader so i initialize the dll with private Redemption.SafeMailItem safeMail = Redemption.RedemptionLoader.new_SafeMailItem(); which shows the Eval-Popup. All good. But when i assign the outlook mail item to the object safeMail.Item = mail; // of type Microsoft.Office.Interop.Outlook.MailItem then this exception appears: Unable to cast COM object of type 'System.__ComObject' to interface type 'Redemption.ISafeMailItem'. This

Positioning of a menu item image (hbmpItem of a MENUITEMINFO) in a context menu

*爱你&永不变心* 提交于 2019-12-02 11:04:30
问题 I am inserting a menu item into an Outlook Context menu for a subject text control. Here you can find a previous question I had on doing this. The issue I have is that the image of the menu item is positioned strangely in Outlook 2010. In Outlook 2007 it is positioned differently. It seems that the menu item is holding the position for the checked image free in Outlook 2010. This shows how my menu item looks with the below code. Notice the large space to the left of the image. This shows how

Import .msg file to outlook custom folder using c#

筅森魡賤 提交于 2019-12-02 10:38:46
I need to add the .msg files to outlook custom folder using VSTO addin c# Outlook.Application objOutlook = new Outlook.Application(); Outlook.MailItem email = (Outlook.MailItem)objOutlook.Session.OpenSharedItem(strFilePath); Outlook.MailItem movedItem = email.Move(ParentFolder); You can open an existing Outlook message from a disk by using the CreateItemFromTemplate method of the Application class. The method creates a new Microsoft Outlook item from an Outlook template (.oft) and returns the new item. But you can pass an Outlook .msg file too. The How To: Create a new Outlook message based on

Getting email address from a Recipient object

雨燕双飞 提交于 2019-12-02 10:21:35
I’m developing a VSTO addin which needs to read all the email address when a new email is being sent out. Below is the code I’m using right now but it is not working in few cases. if (addr.Type == "EX") { if (addr.AddressEntryUserType == OlAddressEntryUserType.olExchangeUserAddressEntry || addr.AddressEntryUserType == OlAddressEntryUserType.olExchangeRemoteUserAddressEntry) { exch = addr.GetExchangeUser(); smtpAddress = exch != null ? exch.PrimarySmtpAddress : null; } else if (addr.AddressEntryUserType == OlAddressEntryUserType.olOutlookContactAddressEntry) { cont = addr.GetContact(); /

How can I reliably get the object of a contact context menu in an Outlook 2013 addin?

拥有回忆 提交于 2019-12-02 10:02:58
问题 I am adding an entry to the context menu for a Contact in Outlook 2013 following the example in this article. Here is the XML: <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui" onLoad="Ribbon_Load"> <contextMenus> <contextMenu idMso="ContextMenuContactItem"> <button id="MyContextMenuContactItem" label="Do something..." onAction="OnDoSomething" insertAfterMso="DialMenu"/> </contextMenu> </contextMenus> </customUI> The entry shows up in the menu properly, and when I click

Shared Add-ins for Outlook 2007 Capturing ReplyToAll Event

余生颓废 提交于 2019-12-02 09:12:40
I am using VS 2010 & Dot Net Framework 2.0. I have created a project in Extensibility->Shared Add-ins for Outlook. I am trying to capture ReplyToAll Event it is not getting fired. Please look the below code: OnConnection Method inspectors = applicationObject.Inspectors; inspectors.NewInspector += new Outlook.InspectorsEvents_NewInspectorEventHandler(inspectors_NewInspector); void inspectors_NewInspector(Microsoft.Office.Interop.Outlook.Inspector Inspector) { mailItem = null; try { Outlook.NameSpace ns = Inspector.Session; Outlook.MAPIFolder inbox = ns.GetDefaultFolder( Outlook.OlDefaultFolders