Posts Tagged ‘Object model’

Using Word Dialogs programmatically: C# sample

This blog is about a sample add-in project (with source code) demonstrating how to use Word dialogs programmatically. With this add-in you can check if a given dialog is suitable for your task or get version-specific information about that dialog and its properties... Read the rest of this entry →

How to navigate through the Microsoft Office Command Bar system

There are 4 instances of the command bar button "Save" (Id=3) in Excel. Two of them are best known: a button on the Standard commandbar and an item in the File menu. The other two instances are buried in the command bar system... Read the rest of this entry →

HowTo: get the actual type name behind System.__ComObject with Visual C# or VB.NET

Developers accessing Application.Selection and Application.ActiveSheet in Excel or Explorer.Selection.Item(i), Folder.Items(j), Inspector.CurrentItem in Outlook do know the notorious "System.__ComObject" string. It indicates that the actual type of the COM object is unknown... Read the rest of this entry →

How to handle Outlook item’s Reply event: replying from a context-menu

Let's consider the case then the user replies to an Outlook e-mail from the context menu. First off, you can reply to one item only; that item is selected or right-clicked in an explorer window or is opened in an inspector window.... Read the rest of this entry →

How to handle Outlook item’s Reply event: tracking Inspector.Activate

In my previous article I explained the Reply event and parameters it provides. Also, I described a class handling this event in a version-neutral way. Now what I want is to show how you intercept Outlook's Inspector.Activate event.... Read the rest of this entry →

How to handle Outlook item’s Reply event: tracking Explorer.SelectionChange

Add-in Express implements a version-independent approach to handling events of an Outlook item. The class implementing this is called ADXOutlookItemEvents. I recommend that you regard this class as a set of event handlers; you can implement several such classes to follow several business rules... Read the rest of this entry →

How to create a custom event when Excel calculation mode changes

You should be aware that no such event exists. Let's create it. In Excel 2007 - 2010, you can change the calculation mode using the buttons shown in the screenshot below... Read the rest of this entry →

HowTo: Handle events of an Outlook item

There are two variants of handling events of an Outlook item. You can connect to events of an item shown in the active inspector window. In addition, you can connect to events of an item selected in the explorer window... Read the rest of this entry →

How To: Use Restrict method in Outlook to get calendar items

I described how to use the Find and FindNext methods against calendar items in my previous post. Today I would like to take closer look at how to deal with calendar items using the Restrict method... Read the rest of this entry →

How To: Retrieve Outlook calendar items using Find and FindNext methods

In my previous articles I described how to use the Find and FindNext methods of the Items class against mail and contact items. Today we will have a closer look at calendar items... Read the rest of this entry →

How To: Create a new recurring Outlook Appointment item

In my previous article I described how to create a new Outlook Appointment item. Now I want to show you the way to create a new recurring appointment item in Outlook. Unfortunately the Outlook Object Model doesn't provide any intuitive property or method for such a task... Read the rest of this entry →

Why doesn’t Excel quit?

From my experience, Excel doesn't quit because there's a COM object left unreleased either in your code or in the code of a COM add-in loaded in Excel. That is, to debug such an issue, you need to start with turning all COM add-ins off... Read the rest of this entry →

How To: Create a new Outlook Appointment item

There are three ways of creating a new appointment item in Outlook. Today we will examine each of them in depth... Read the rest of this entry →

How To: Retrieve Outlook Contact items using Restrict method

In one of my previous articles I demonstrated the way of using the Restrict method against mail items. Now I am going to use this method against Contact items in Outlook... Read the rest of this entry →

How To: Use Find and FindNext to retrieve Outlook Contact items

Not so long ago I described how to use the Find and FindNext methods to retrieve Outlook mail items from a folder. Today I am going to replace a mail item declaration with a contact declaration. There is no difference between mail and contact items in case we use the Find and FindNext methods... Read the rest of this entry →

How To: Send a Contact item in Outlook programmatically

There are three ways of sending a contact in Outlook. Today we will examine them in detail. Please note that the ContactItem class doesn't provide the Send method like the MailItem class does... Read the rest of this entry →

Have any questions? Ask us right now!