‘HowTo samples’ category archive

HowTo: Support Office 2007 color schemes in your custom forms and task panes

In Office 2007 there are 3 available color schemes – Black, Blue and Silver. The background of controls in command bars and ribbon tabs is changed by Office automatically. Do you want to try changing the background of your Outlook forms and Excel task panes when the MS Office color scheme is changed?... Read the rest of this entry →

HowTo: Identify the state and location of an Outlook form

Add-in Express 2008 allows placing several forms into one Outlook region or task pane. In addition, Add-in Express 2009 enables the end-user to drag and drop custom forms to wherever they want to (naturally, with the developer's permission). Do you need to know where your form is now and in what state? Of course, you do... Read the rest of this entry →

HowTo: Work with threads in Microsoft Office COM add-ins

It is generally known that the Microsoft Office Object Model is not thread safe and accessing some object, property or method not from the main thread may sometimes result in a host application crash. Of course, nothing prevents you from using threads inside the add-in itself, threads that don't need the Office Object Model... Read the rest of this entry →

HowTo: Customize Navigation Pane in Outlook 2003 and 2007

What is the Outlook Navigation pane? According to Microsoft, it is the column on the left side of the Outlook window that includes panes such as Shortcuts or Mail and the shortcuts or folders within each pane. The Navigation Pane was introduced in Outlook 2003 and enhanced in Outlook 2007. Let's see what a developer can do with the Navigation Pane... Read the rest of this entry →

HowTo: Use the Microsoft Word Object Model capabilities for spell checking

The Microsoft Word Object Model contains a lot of capabilities that .NET developers can benefit from. While everybody knows about the abilities of Microsoft Word related to text formatting, few are aware of its rich capacity in the spell check area…... Read the rest of this entry →

HowTo: Get properties of an Outlook email item drag-and-dropped onto a .NET form

There is only one simple and reliable way to get a valid Outlook object when dragging Outlook items onto a .NET form of your Outlook add-in. Let's have a good look at this way by example of MailItem and an advanced Outlook form region...... Read the rest of this entry →

HowTo: Use the View.XML property to filter Outlook items

The View object itself is simple but it has one very powerful property. This property is called XML, it contains an xml definition of a folder view and today we are going to look at the capabilities of the filter element…... Read the rest of this entry →

HowTo: .NET controls in Internet Explorer – natural behavior and look-and-feel

As for the way .net controls behave in Internet Explorer, it’s Okay, Add-in Express will take care of it. As concerns their look-and-feel, we are going to scrutinize this issue closely today. Standard .NET controls look rather clumsy in Internet Explorer...... Read the rest of this entry →

HowTo: Search in Outlook items programmatically

You can search in Outlook in three different ways – by using the Items.Restrict method, Items.Find in liaison with Items.FindNext and Application.AdvancedSearch. The first two have essential limitations in use…... Read the rest of this entry →

HowTo: Deal with the Recipients collection in Outlook

Well, it’s all about Outlook again. Today we will look at the capabilities of the Recipients collection, Recipient and AddressEntry objects. Using these objects you can get all necessary information about recipients, and you can also modify their e-mail addressees...... Read the rest of this entry →

HowTo: Avoid “Old format or invalid type library” error

Today I’d like to draw your attention to one specificity of the Excel Object Model that every .NET developer should be aware of. Those who are unaware, may get the notorious "Old format or invalid type library" error...... Read the rest of this entry →

HowTo: Handle the Outlook ItemSend event

One of the most frequent questions we get concerning the Outlook Object Model is "How to handle the Send button event?" Here is the answer: "You need to use the Application.ItemSend event"...... Read the rest of this entry →

HowTo: Support MS Office applications, Internet Explorer and Outlook Express in one project

Yes, you can do that in one Visual Studio project, but not in one solution. And yes, you can do it using the Add-in Express products. There are only two things to keep in mind…... Read the rest of this entry →

HowTo: Install a COM add-in automatically using Windows Server Group Policy

Here you will get to know how you can use Windows Server Group Policy to install Office applications automatically, including Office COM add-ins. You will learn how to create a Group Policy object in Windows Server 2000, 2003 and 2008, how to assign and remove an installation package…... Read the rest of this entry →

HowTo: Store Microsoft Office documents in your custom data storage

One of the tasks that developers often run into is saving and retrieving Office documents (or document copies) from external data storage. This storage can be an SQL database, Web-service, FTP server as well as a shared network resource of a local area network. Let’s try to handle this task for such popular MS Office applications as Word, Excel, PowerPoint and Outlook…... Read the rest of this entry →

HowTo: Exchange Data using the Outlook Attachments collection

Normally Outlook developers use the MailItem.UserProperties collection to send and receive some additional information with email messages. In this sample add-in for Microsoft Outlook, I suggest a slightly different approach ...... Read the rest of this entry →

Have any questions? Ask us right now!