TECHNICAL
ARTICLES
Programming
Microsoft Outlook with Visual Studio .NET
Articles
Whitepapers
Rebuilding the Outlook Interop Assembly
Office XP Primary Interop Assemby (PIA)
Technical and KB Articles
The following articles will be of interest to Visual Studio .NET
developers who are looking to develop Outlook applications with Visual
Studio .NET.
An Introduction to Programming Outlook 2003 Using C#
Best Practices When Developing Command Bars for the Microsoft Office System
Building Outlook Add-ins with Visual Basic .NET
BUG: "Attempt to Access
the Method Failed" Error Message When You Use a Reference to the Wrong
Microsoft Forms 2.0 Object Library
BUG: Cancel
Parameter for Office Events Is Ignored in Visual Studio .NET 2003
BUG: InvalidCastException Is Generated When You Try to Sink Outlook
Application Events
BUG: Visual Basic .NET "'[Method]' is ambiguous across the inherited
interfaces" Error Message When Using Office Automation
Creating Office Managed COM Add-Ins with Visual Studio .NET
Developing Microsoft Office Solutions Using C#
HOW TO:
Automate Outlook and Word by using Visual C# .NET to create a pre-populated
e-mail message that can be edited
HOW TO: Binding for Office Automation Servers with Visual C# .NET
HOW TO: Build an Office COM Add-in With Visual Basic .NET
HOW TO: Build an Office COM Add-in With Visual C# .NET
HOW TO: Create
a contact by using ADO and ExOLEDB in Visual Basic .NET
HOW TO: Create
a contact by using ADO and ExOLEDB in Visual C# .NET
HOW TO: Create
a contact by using an Item object in Visual Basic .NET
HOW
TO: Create a Mailbox-Enabled Recipient by Using C# .NET
HOW TO: Create an Appointment by Using Outlook Object Model in Microsoft
Visual Basic .NET
HOW TO: Create
an Outlook Calendar folder by using the HttpWebRequest class in Visual Basic
.NET
HOW TO: Create a Meeting Request by Using Outlook Object Model in Visual
Basic .NET
HOW TO: Delete an Outlook Folder by Using Outlook Object Model in Visual
Basic .NET
HOW TO: Enable
Office COM Add-ins to Opt-in to Windows XP Themes
HOW
TO: List All Fields of an Object by Using Collaboration Data Objects for
Exchange 2000 Server Library in Visual C# .NET
HOW TO: List Members of a Distribution List by Using Outlook Object Model in
Visual Basic .NET
HOW TO: List the File Menu Commands by Using Outlook Object Model in Visual
Basic .NET
HOW
TO: Read Mail by Using Collaboration Data Objects 1.21 Library and
Reflection in Visual C# .NET
HOW TO:
Retrieve an object's security descriptor property by using Visual Basic .NET
HOW TO: Retrieve Appointments by Using the Outlook Object Model in Visual
Basic .NET
HOW TO: Retrieve Contacts by Using Outlook Object Model in Visual Basic .NET
HOW
TO: Retrieve Messages by Using Collaboration Data Objects for Exchange 2000
in Visual C# .NET
HOW TO: Retrieve Unread Messages from Inbox by Using Outlook Object Model in
Visual Basic .NET
HOW TO: Search
for the URI property of a sender's e-mail submission and to send an e-mail
message by using this property in Visual Basic .NET
HOW
TO: Send Mail with Configuration by Using Collaboration Data Objects for
Windows Library in Visual Basic .NET
HOWTO: Use Automation to
Create Office Command Bars and Controls with Visual Basic .NET
HOWTO: Use Automation to
Create Office Command Bars and Controls with Visual C# .NET
HOW TO: Use Automation to Get and Set Office Document Properties with Visual
C# .NET
HOW TO: Use
the CDOEX Library to create a contact by using an Item object in Visual C#
.NET
HOW TO: Use
the CDOEX Library to create a recurring meeting that has exceptions in
Visual Basic .NET
HOW TO: Use
the CDOEX Library to create an Outlook Calendar folder in Visual Basic .NET
HOW TO: Use
the CDOSYS Library to send an e-mail message by using the SMTP port in
Visual Basic .NET
HOW TO: Use
the Microsoft Outlook Object Library to force a Send/Receive action by using
Visual C# .NET
HOW TO: Use
the Microsoft Outlook Object Library to retrieve a message from the Inbox by
using Visual C# .NET
HOW TO: Use
the Microsoft Outlook Object Library to retrieve an appointment by using
Visual C# .NET
HOW TO: Use
the Microsoft Outlook Object Library to send a message that has attachments
by using Visual C# .NET
HOW TO: Use
the Microsoft Outlook Object Library to send an HTML formatted message by
using Visual C# .NET
Incorrect
reference or missing reference to Office 2003 primary interop assembly (PIA)
INFO: Develop Microsoft Office Solutions with Visual Studio .NET
Information
about designing Office XP add-ins and Office 2003 add-ins by using the .NET
Framework
Introducing .NET to Office Developers
Microsoft Office and .NET Interoperability
Microsoft
Visual Studio .NET may detect the Microsoft Office 2003 Primary Interop
Assemblies as dependencies when you create a Microsoft Visual Studio .NET
Setup project
Newsgroup
- Accessing common properties of Outlook Items in .NET
Office 2003 Primary Interop Assemblies Installation
OL2002: COM Add-Ins Are Not Trusted If They Are Created with Visual Studio
.NET
PRB: Macro Warning in Office Application When .NET Shared Add-in Is Loading
PRB: Visual Studio .NET Shared Add-in Is Not Displayed in Office COM Add-ins
Dialog Box
Programming for Outlook using managed code is better with a Shim
Programming for Outlook using managed code is hard
Programming Outlook with C#
Programming
samples that can reference items and folders in Outlook by using Visual C#
.NET
Support Policy for Microsoft Exchange APIs with .NET Framework Applications
Tips and Tricks: Building Microsoft Office Add-ins with Visual C# .NET and
Visual Basic .NET
Using the COM Add-in Shim to Trust Outlook 2002 Add-ins Built with Visual
Studio .NET
What's New in Microsoft Office Outlook 2003 for Developers?
Whitepapers
The following whitepapers are essential for developers writing Office Add-ins
that are digitally signed with the help of a shim.
Unfortunately, digital signatures do not always determine whether Outlook Add-ins
are trusted or untrusted. The
Outlook E-mail
Security Update and the
Administrative
Form determine the level of trust and access to both the Outlook Object
Model (OOM) and Collaboration Data Objects (CDO).
Deployment of Managed COM Add-Ins in Office XP
Isolating Office Extensions with the COM Shim Wizard
Secure Deployment of Managed COM Add-Ins in Office XP
Using the COM Add-in Shim Solution to Deploy Managed COM Add-ins in Office
XP
Using the Smart Tag Shim Solution to Deploy Managed Smart Tags in Office XP
Rebuilding the Outlook Interop Assembly
The preferred means of referencing Outlook is with an
Outlook Primary Interop Assembly (PIA). The Outlook PIA is only available
for Outlook 2002 and Office XP. If you are targeting both Outlook 2000 and
2002, you will have to rebuild the Outlook Assembly used for COM Interop. If
you plan to build an event-aware application, you must rebuild
Interop.Outlook.dll. The following article applies to Excel Events. You can
use the steps outlined in this article to modify Interop.Outlook.IL and
rebuild Interop.Outlook.dll.
PRB: Error Using WithEvents or Delegates to Handle Excel Events from Visual
Basic .NET or Visual C# .NET (Q316653)
The sequence of steps to rebuild Interop.Outlook.dll is as follows:
- Save and close your Visual Studio .NET project.
- Open a Visual Studio .NET command prompt and change the directory to
the output directory of your project (for example, project name
\bin for a Visual Basic project or project name \bin\release for a
C# project).
- Use Ildasm.exe to extract the intermediate language from the Outlook
interop assembly, as follows:
ildasm.exe /source Interop.Outlook.dll
/output=Interop.Outlook.il
- Open Interop.Outlook.il in a text editor such as WordPad and search
for occurrences of "_SinkHelper". Change the access privileges of the _SinkHelper
classes from Private to Public, and then save and close
Interop.Outlook.il.
- Open your project in Visual Studio .NET.
- In Visual Studio .NET Solution Explorer, right-click Outlook in
the list of project references and then click Properties . Change
the Copy Local property to False .
IMPORTANT : This step is required. If you do not set the Copy
Local property of the reference to False , Visual Studio .NET
regenerates the interop assembly when you compile the project.
- At the Visual Studio .NET command prompt, use Ilasm.exe with the /dll
switch to recompile the intermediate language file into an interop
assembly, as follows:
ilasm.exe /dll Interop.Outlook.il /output=Interop.Outlook.dll
Office XP Primary Interop Assembly
The Office XP
Primary Interop Assembly (PIA) is finally available for download. The Office
XP PIA provides the preferred Interop Assemblies for developers who are
targeting the Office XP platform. At this time, Microsoft does not offer a
PIA for Office 2000. Visit the following to download the Office XP PIA:
http://www.microsoft.com/downloads/details.aspx?familyid=C41BD61E-3060-4F71-A6B4-01FEBA508E52&displaylang=en
For an overview
and discussion of some known issues with the Primary Interop Assembly, see
the following:
Office XP Primary Interop Assemblies Known Issues
Working with the Office XP Primary Interop Assemblies
Note: The Office XP Primary Interop Assembly does not fix the
design-time problem of "[Name] ambiguous across inherited interfaces." For
Outlook Interop, there are several methods that cause the error to appear in
the Visual Studio .NET Task List. These methods include Explorer.Close and
Inspector.Close. The only way to resolve the design-time error is to use the
RCW ExplorerClass and InspectorClass in your declarations of event-aware
objects. For a discussion of the problem, see the following:
BUG: Visual Basic .NET "'[Method]' is ambiguous across the inherited
interfaces" Error Message When Using Office Automation |