FAQ Database Discussion Community


Outlook Addin appointmentitem PropertyChange event firing too much

c#,outlook-addin
I'm creating an Outlook addin that needs to trigger when the attendees of a meeting are changed. The problem I'm encountering is that the PropertyChange event of an Appointment item is firing way too much and because of that I can't get the exact amount of attendees. Here is some...

Deploy Outlook add-in to Office Store

outlook,add-in,outlook-addin,office365
I made add-in for outlook and want to release it to store.office.com. I have dev license for office 365. I made add-in for Outlook using Visual Studio and everything works. I found Microsoft Seller Dashboard, where I can add my application. But on second step it asking me to provide...

How to determine if the RecurrencePattern in Outlook is end by a date or end by recurrence count

outlook,outlook-addin
For a finite recurring appointment in Outlook, the RecurrencePattern interface doesn't expose a property to tell you if the pattern is end by a date or end by recurrence count. The PatternEndDate, EndTime, and Occurrences properties are always populated. Is there a way to determine the end type of the...

Outlook interop getting “0x80020003 (DISP_E_MEMBERNOTFOUND)” error when processing appointment exceptions

outlook,outlook-addin
I have a piece of code to process appointment changes in Outlook. If the appointment is a recurring one then the code retrieves the RecurrencePattern and go through the items in the Exceptions list (this "exception" refers to "appointment exception" meaning one of the appointment in a recurring series is...

How to read html body of attachment that is mail message in C#?

outlook,outlook-addin
so the problem is I need to get HTML body of mail that is attachment,but don't even know where to start. Tried (MailItem)attachment, searched in attachments properties,saving to file and retrieving data didn't work for me eather. Is it maybe possible to retrieve data with PropertyAccessor? The main question is...

is it possible to access outlook add in method from windows services

c#,windows-services,outlook-addin
I have developed an ADD-in for outlook 2010.Now i have to create a windows services that will access the ADD-in Class and Methods etc. is it possible to access outlook add in method from windows services. Ple suggest ........

How to avoid two compose mail at a time in Outlook

c#,outlook-addin
I am trying to customize Outlook through C# code addin. It's working but when opening two or more compose mails (through new mail), some problems appear. So I want to avoid opening of two or more compose mail at a same time in Outlook. My Outlook version is 2013. In...

VSTO Outlook Addin Email Sender Name

c#,vsto,outlook-addin
I have a VSTO Outlook 2013 addin that reads properties from CurrentItem when the read mail window is open. When I get the property Sender I always get system.__comobject Why does it keep returning this?

Is it possible to access redemption method of outlook add in using windows services

c#,windows-services,outlook-addin,outlook-redemption
I have created outlook addin in C# to storing mail subjects in SQLite database using redemption(background). Can we access redemption method/Class of outlook add in into the windows service. Outlook Object Model cannot be used from a service....

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

c#,vsto,outlook-addin,outlook-2013
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...

Visual Studio Outlook Add-In: Can't access certain properties/methods

visual-studio-2013,outlook-addin,outlook-vba
I'm developing an Outlook (2010) add-in using Visual Studio 2013 (Targeting .NET 4). In developing, certain outlook properties/methods seem to be unavailable. I think it has to do with the Outlook security protection. The following code works fine from Outlook VBA Public Sub OutlookTest() 'Dim oApp As New Outlook.Application (NOT...

Replace text in MailItem Body

c#,vsto,outlook-addin
I've added a ribbon button in the Outlook Explorer, that creates a new email from the selected email when clicked. This works fine using the MailItem.Copy method. But I also need to replace some text in the message body with a different value. The problem is the email could be...

VSTO Addin Save File Dialog

c#,vsto,outlook-addin
I have a VSTO addin that has a form with a saveFileDialog on it. I want to pass a specific filename and path to saveFileDialog to set the properties FileName and InitialDirectory. The problem is the only way I can see to do it is to modify InitializeComponent() and the...

Enable Tab Key in my Web Browser Control

vb.net,outlook,webbrowser-control,keyboard-shortcuts,outlook-addin
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...

Outlook - Search Routine Only Works In Debug Mode

c#,outlook,add-in,outlook-addin
I have a routine in C# to search for contacts in Outlook by filtering the Contact folder and it works when I debug it step by step, but if I let it run alone (without debug break) then it just do nothing, the results returned by Outlook are only empty...

C# Outlook 2013 Auto-Archive Addin

c#,outlook-addin
I am creating an outlook addin that provides a new ribbon button that will auto archive attachments and email according to date, sender, subject, attachment, name, etc. My question is, how can I access the sender/subject/attachment names/attachment file types in C# via the API, and how to tell whether or...

Store data in Outlook Addin for each user, then query it for all users

exchange-server,outlook-addin
Is there a way for an Outlook add-in to store some data for each outlook user, then an Exchange admin can query this data for all users at once? If I store the data into Item.UserPorperties or Folder.StorageItems, Exchange Admins will not have access to them. And I prefer not...

EndTime and PatternEndDate properties in RecurrencePattern object of an Outlook appointment

.net,outlook,outlook-addin
I have realized this weird behaviour in Outlook Interops, that in the RecurrencePattern class, the StartTime and EndTime property only give you the correct time part of the pattern, and the year is set to an arbitrary year way in the past like 1601 or 1899. Where the PatternStartDate and...

How to create an appointment using C# VSTO and display the Schedule Assistant view

c#,vsto,outlook-addin
I want to add C# code (in my Outlook VSTO Addin) to create an appointment and show the Schedule Assistant view when it's displayed. Below is the code I've written so far which creates an appointment, adds the recipient. But when the Display method is called, its displayed showing the...

Is Folder.PropertyAccessor safe to call from managed code?

c#,.net,outlook,vsto,outlook-addin
We recently finished development of a VSTO Outlook add-in. For some configuration data, it uses custom olText properties on a Folder. When our add-in detects that these properties are not available, it uses the UserDefinedProperties property of the Folder to Find/Add our custom properties if they don't exist. if (folder.UserDefinedProperties.Find(propertyName)...

How to add a ribbon group to both Outlook inspector windows and the inline response contextual menu?

c#,outlook,vsto,outlook-addin,ribbonx
I want to add the same controls to the ribbon whenever an email is being composed, regardless of whether the email is popped out in an inspector or in an inline response. I can do this by duplicating the same XML in two places, of course, like this: <customUI onLoad="Ribbon_Load"...

Possible ways to optimize batch Outlook appointment processing with MAPITable

outlook,outlook-addin,outlook-redemption
I'm working in a component that syncs our own appointment data with the ones in a selected calendar folder in Outlook. The first time when our appointments sync to Outlook, the ID of our appointment is stored in the user properties of the newly created Outlook appointment. Therefore, before syncing...

Outlook AddIn `PropertyPage` not showing up in Outlook Options

.net,vsto,outlook-addin
I have an Outlook 2007 Add-In project which I'm trying to add a PropertyPage to. I've implemented a OptionsPage class (which implements PropertyPage) which is added during the Application.OptionsPagesAdd event. Public Class OptionsPage Implements Microsoft.Office.Interop.Outlook.PropertyPage Private Sub Me_Load(sender As Object, e As System.EventArgs) Handles Me.Load System.Windows.Forms.MessageBox.Show("Test Options Loaded") End Sub...

How to reach formRegion_FormRegionInitializing runtime?

outlook-addin
Hello I'm trying to show/hide formRegion in outlook 2007 at Runtime. I have it showing/hiding with e.Cancel in FormRegionFactory_FormRegionInitializing, but it only refreshes when users selects another email. How do i reach event at runtime or there is a better way of showing/hiding the region in 2007 outlook. if (Settings.Default.DisplayWhere...

Outlook Addin, When Loading Error Ribbon_GetDCVisible

c#,outlook,vsto,outlook-addin
I have an outlook VSTO addin, I get the error Ribbon_GetDCVisible Exception occurred while calling the function GetVisisble when it loads. Yhe stack trace shows my last function called is the ThisAddIn_StartUp() handler and it is e mpty. Any ideas? EDIT: I just made a blank outlook 2013 addin and...

How do you find the next available time when creating an Appointment using C# VSTO

c#,vsto,outlook-addin
I've written the following code in C# to create a new appointment with 1 attendee (and me). But the start time isn't automatically defaulted to the next available free time. AppointmentItem newAppointment = Globals.ThisAddIn.Application.CreateItem(OlItemType.olAppointmentItem); newAppointment.MeetingStatus = OlMeetingStatus.olMeeting; Recipients recipients = newAppointment.Recipients; Recipient readyByRecipient = null; readyByRecipient = recipients.Add(emailAddress); readyByRecipient.Type =...

VSTO Outlook 2013 Addin Quit

c#,dialog,vsto,outlook-addin
I have a VSTO addin that displays a a dialog box with buttons yes no and cancel. I want the form to close anytime cancel or the X are clicked. I also want the application to quit when the form is closed. Here is my code: var frm = new...

Is there any registry key to check all outlook inactive Addins (Not Disabled)

outlook,registry,outlook-addin
We know in outlook there are three states of a AddIn Active , Inactive , Disabled. ** My question is how we can determine if a AddIn is in Inactive state using some registry Keys ** or any other method to do so. ...

MailItem SaveAs() Method FIletypes

c#,vsto,outlook-addin,office-addins
When I pass olMHTML it saves it with .msg extension, but if I change the extension to .mht it works as an mht file perfectly and if I don't I have trouble opening the file with .msg extension. If I save it as olMSGUnicode, it saves with no extension but...

C++ ATL Outlook plugin does not load

c++,outlook-addin,email-attachments,atl
I have made an Outlook plugin for 64 bit version of Outlook 2013 using Visual Studio Community 2013. I want to work with attachments from mail when sending mails. The plugin is not loaded by Outlook even though LoadBehavior=3 in the registry and if I try to load it in...

VSTO Outlook Addin Ribbon Group Not Showing on Ribbon

c#,outlook,vsto,outlook-addin
I have an Outlook Addin That Adds a Group to the Ribbon with two buttons. It was working perfectly before I added the second button, but they have the same properties just different click handlers. It shows up in the correct place in the customize ribbon menu, but it is...

How to capture “Print Tab” click event at the backstage in Outlook 2010 ?

outlook,outlook-addin,outlook-2010,office-addins
I want to capture the click events in "TabPrint" at the backstage of outlook 2010. Followint is what I have done so far I have defined a custom UI in xml as following. I have directed every event to one method (which is OnPrintClick) <?xml version="1.0" encoding="utf-8" ?> <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui"...

Automatically insert email signature into Outlook Meeting Invite

vba,outlook,outlook-addin,outlook-vba
I have been searching the web for a way to do this but no such luck. My goal is to save a meeting agenda template into an email signature which would be inserted into every meeting invite created by me. Looking for some clues on how to do this? ...

VSTO Outlook Getting Email Address From Someone with same Domain

c#,vsto,outlook-addin
In VSTO outlook 2013 addin I use this method to get the email address of the sender: Inspector currentObject = Globals.ThisAddIn.Application.ActiveInspector(); Object currentItem = currentObject.CurrentItem; MailItem message = currentItem as MailItem; string senderMailAddress = message.SenderEmailAddress; This always works great except in one case. I get a string that is their...

Get result of ShowCategoriesDialog in Outlook

c#,outlook,vsto,outlook-addin
In my code I open categorize dialog like this: item.ShowCategoriesDialog(); Is it possible to determine whether user clicked "OK" or "Cancel" in the dialog? Currently I compare item's categories before and after showing the dialog, but maybe there is a better way....

How to catch email deletion on the main inbox explorer?

c#,outlook-addin,outlook-2013
I'm having problems catching the deletion event for emails that are deleted on the inbox explorer. None of the events I've tried catch this. MailItem.BeforeDelete only triggers if the email is deleted using the inspectors delete button, which is fine but it only catches a portion of deletions. Explorer.BeforeItemCut only...

VSTO Outlook Addin Dialog Boxes

c#,wpf,vsto,outlook-addin,office-addins
I've been trying to figure out the correct way to pop up a dialog box in a way similar to MessageBox.Show in my VSTO addin. I read this could be achieved using WPF, but is there a better way? I've found many different examples most of which are in VBA,...

Outlook 2010 - how to receive attachment events when mail item is created from Word or Excel

ms-office,vsto,outlook-addin
I have an Outlook 2010 plugin using VSTO that converts attachments before they are added to mail items. The way I accomplish this is to register for new inspector events in the plugin startup inspectors = Application.Inspectors; inspectors.NewInspector += new Microsoft.Office.Interop.Outlook.InspectorsEvents_NewInspectorEventHandler(OnNewInspector); then in the new inspector event handler, check for...

What is the difference between an MS office app and MS office add in

ms-office,outlook-addin,office365,office-addins,office-app
I was trying to find a way to publish an outlook add in to office store. But I found out that we can publish only office apps and not the add ins to the office store. Hence I wanted to know what is the difference between an office app and...

Save File Dialog in Outlook VSTO Addin

c#,outlook,vsto,outlook-addin
I want to create a save file dialog that opens when you press a custom ribbon button and has the filename and initialdirectory properties set to certain values. Right now I create that dialog within a form. In the designer it shows in the bottom pane as it is not...

VSTO Addin Form Closing Handler

c#,forms,vsto,outlook-addin
I have a VSTO addin for outlook 2013. I'm trying to register an event with an event handler for a Form closing event. Here is my code from class Form1: public delegate void MyEventHandler(); private event MyEventHandler Closing; private void OtherInitialize() { this.Closing += new MyEventHandler(this.Form1_Closing); } Also from class...

MailItem user property of type olDateTime showing by default 12/30/1899 value. How can we show empty instead?

c#,vsto,outlook-addin,office-addins
I have created a user property on mailitem called "DueDate" i am setting default value null for this user property but when change the view in outlook & add the DueDate custom column on default view, it is showing "12/30/1899" value. var prop = mailItemObject.UserProperties.Add("DueDate", Outlook.OlUserPropertyType.olDateTime, null, null); prop.Value =...

C# Access Data in VSTO Addin

c#,vsto,outlook-addin
I'm creating a VSTO addin. I want to create a dictionary once as outlook starts that I can then access from methods within the OutlookRibbon class. What is the best practice or proper method to create such a dictionary? I currently have the method where the dictionary is created in...

How to add images from resources folder as attachment and embed into outlook mail body in C#

c#,vsto,outlook-addin,outlook-2013
I have a couple of images stored in visual studio project Resources folder, and I have to load them and display on the outlook mail body. Here it is the code: Bitmap b = new Bitmap(Properties.Resources.MyImage); ImageConverter ic = new ImageConverter(); Byte[] ba = (Byte[])ic.ConvertTo(b, typeof(Byte[])); MemoryStream logo = new...

Outlook AddIn Zoom.Percentage

c#,vba,outlook,zoom,outlook-addin
Im trying to translate this VBA code from an Outlook AddIn to C# Private Sub objInspector_Activate() Handles objInspector.Activate Dim wdDoc As Microsoft.Office.Interop.Word.Document = objInspector.WordEditor wdDoc.Windows(1).Panes(1).View.Zoom.Percentage = lngZoom End Sub But I can't get access to the Panes.View.Zoom.Percentage property The main idea is that when the user opens an email, he...

Application.CreateItem and default store VSTO Outlook 2010-2013

outlook,vsto,outlook-addin
I am working on an Outlook VSTO addin (.NET4.0 targeting Office 2010/2013). It looks like the only way to create an item (e.g. a contact) is to use CreateItem on the Application object Globals.ThisAddIn.Application.CreateItem(OlItemType.olContactItem) as ContactItem Therefore the created item will live in Outlook's default store (see picture). Is there...

C# Outlook 2013 Addin Accessing Explorer

c#,vsto,outlook-addin,explorer
Is it possible to access Explorer to check for the existence of certain folders, and create folders if necessary from an outlook addin? If so what API/interface is used to do so from outlook. The MAPIFolder seems to be just for the outlook folders. Thanks in advance EDIT: To clarify,...

Publishing Outlook/Excel add to the office store

ms-office,outlook-addin,publishing,excel-addins,office-addins
I have developed an outlook add-in and an excel add-in and created there respective installers. Now I want to publish these installers to the Microsoft office store(https://store.office.com/). Can anyone provide me the steps to do that?...

How to check if attachment is mail message?

outlook,outlook-addin
I'm trying to determine if attachment is mail message, i have a method for identifying if attachment is PDF from its first header bytes. if (buffer[0] == 0x25 && buffer[1] == 0x50 && buffer[2] == 0x44 && buffer[3]== 0x46) So first header bytes 37,80,68,70 I tried to check some email...

C# VSTO Addin Exception With CurrentItem

c#,vsto,outlook-addin
When trying to obtain the current item with focus in an outlook 2013 addin I get this exception: An exception of type 'System.MissingMemberException' occurred in System.Dynamic.dll but was not handled in user code Additional information: Error while invoking [PROPERTYGET, DISPID(0)]. The code throwing the exception is this: Inspector curObj =...

Correct Way to Shutdown an Addin While Outllook Still Runs

c#,vsto,outlook-addin
I have an outlook addin I'm writing in VSTO. I want to exit the addin in a certain case. System.Application.Windows.Forms.Exit() exits outlook completely. I just want the addin to shutdown. I can't call ThisAddIn_Shutdown() because it is private. What is the correct practice to shut the addin down? This addin...

Outlook 2013 Form Region and the Delete Key

c#,outlook,outlook-addin,outlook-2013
So, I've finally had to deal with this annoying issue. It seems that it's a known "bug" and there doesn't seem to be a great work-around. I was wondering what seems to be the best work around for this. A little bit of info. In my form region I have...

Outlook Addin Updating - Replacing DLL sufficient?

vsto,outlook-addin
Working on an outlook addin and I was wondering if manually replacing the compiled DLL on a target machine is sufficient when I decide to update my addin ? is that practice even valid for stability ? on some minor changes i did to my addin for tests, It seemed...

How to show custom update/modifications text when I publish my outlook-addin. VB.NET

vb.net,visual-studio-2012,outlook,outlook-addin
Recently I have created an Addin for my outlook 2013 in VB.net. I usually do a lot of modifications on this application especially in the beginning. These modification automatically download when a user starts its outlook as soon I publish the project. The question I have, and which I cant...

Is it possible to reload outlook Office.ComAddIn list?

c#,outlook,outlook-addin,outlook-2010
Background is I have an old addin which i use to install other addin and remove the old one on ThisAddIn_Startup . Everything seemed to work fine,but found one Computer where solution didn't work. I install and remove the addins successfully, but addin doesn't load on first load. private static...

No .designer.cs and .resx files created for .cs files when creating an outlook add-in project in visual studio

visual-studio,outlook-addin
I created a new outlook add-in project in visual studio 2013 but no .designer and.resx files were created. But designer.xml was created. How can I add those other 2 files? Any suggestions will prevent me from blocking further!...

VSTO C# - Outlook Addin - How to differ between .AttachmentSelections objects

c#,.net,outlook-addin,officedev
Outlook 2010 Addin in Visual studio (C#). I am trying to find a way to be able to tell the difference between .AttachmentSelection retrieved from Explorer (when just Previewing a mailitem on the inbox) and .AttachmentSelection retrieved from Inspector (when double clicking and actually opening the mail in a separate...

Deploying VSTO Addin with Windows Installer

c#,vsto,outlook-addin,office-addins
I found the documentation here: https://msdn.microsoft.com/en-us/library/cc442767.aspx But in my solution I do not have a OfficeAddInSetup project so I assume I am to add a second project with installshield to achieve this, but in the docs it references VSTO 2010 redistributable. I am using 2013. Are the directions any different...

Searching user tasks by task.body text

c#,visual-studio-2013,vsto,outlook-addin
Good morning all! I have spent a good bit of time searching and reading forums about this, but I can't seem to find a solution. Any help you all can offer is greatly appreciated. I have created an Outlook Add-In via C# and Visual Studio 2013. This add-in will create...

How to create a top-level folder in my Outlook using vb.net - VB.NET, Outlook 2013

vb.net,outlook,outlook-addin
So as the title says, I am trying to create a top-level folder in my Outlook but I haven't got any success with it. I've read several tutorials and code snippets but non of them seem to be a success. So now i Have this piece of code which creates...

How to show the appointment page from a form region in outlook

outlook,outlook-addin
I have a very simple outlook form region. It is configured as a separate item, and, it is set to appear whenever a we try to compose a new appointment item. (Meeting request). Once I click the button above, it should populate the sender and go back to the main...