Outlook Object Model: How to identify existing categories and updating/adding new categories in Outlook 2007 using programmatically?

With continuation of my previous–related blog post, I got this task to find out the way how to identify the existing categories and updating/adding new categories in Outlook 2007 using Outlook Object Model programmatically. I tried the following to find whether the category exists or not: Public Function CategoryExists(categoryName As String) As Boolean   Dim…

1

WebDAV : How to retrieve list of folders from Exchange Server using Search method (WebDAV) programmatically ?

using System; using System.Net; using System.IO; using System.Text; using System.Xml;   namespace SampleCode { class GetFolders { static void Main(string[] args) { // Variables. System.Net.HttpWebRequest Request; System.Net.WebResponse Response; System.Net.CredentialCache MyCredentialCache; string strRootURI = "http://server/exchange/username/Inbox/"; // Provide the valid URI string strUserName = "UserName"; string strPassword = "Password"; string strDomain = "Domain"; string strQuery =""; byte[]…


Outlook Object Model : Creating Outlook Categories programmatically and assign colors, shortcut keys to that

In this blogpost, we will try to create the Outlook Categories programmatically using Outlook Object Model API. Also we will assign the relevant colors and shortcuts to that. Whenever we try with Outlook Object Model, it’s relatively simple. ‘[Code snippet to create Categories] Private Sub CreateCategory()   Dim objNameSpace As NameSpace Dim objCategory As Category…

1

Download : Windows API code pack for .Net Framework

The Code Pack is a source-code library that provides access to the new Windows 7 features (and some related Windows Vista features) from managed code. These features are not available to developers today in the .NET Framework. Minimum .NET Framework version required to use this library is 3.5. The individual features supported in this version…


Code snippet using OOM : How to modify in-appropriate CSS/HTML tags available in the Outlook e-mail’s HTMLBody ?

Hi, Please find the following code snippet shows how we can modify/edit/add more or in-appropriate CSS/HTML tags available in the Outlook e-mail’s HTMLBody using Outlook Object Model: ‘[Code Snippet – Outlook Object Model ‘[How to modify Outlook e-mail’s inappropriate CSS/HTML tags from its HTML Body … ‘Definition Dim str As String Dim str1 As String…

1

OOM : How to retrieve Outlook attachments ( Reference, Value, Embedded and OLE) using VBA?

Please find the following code snippet for retrieving various Outlook attachments  – Reference, Value, Embedded and OLE using Outlook Object Model (OOM) & VBA: ‘Code Snippet : How to retrieve Outlook attachments using Visual Basic for Application (VBA) Dim omailitem As Outlook.MailItem Dim oattach As Outlook.Attachment Dim ofolder As Outlook.Folder   Set ofolder = Application.Session.PickFolder…

1

OOM & VBA : How to delete Outlook recurring Task items (whose status marked as Completed)

‘[VBA & Outlook Object Model : Code snippet to delete Outlook recurring Task items (whose status marked as Completed)]   ‘Declaration part … dim otaskitem as Outlook.Taskitem dim ofolder as Outlook.Folder   ‘Get the Task items set ofolder = Application.Session.GetDefaultFolder(olFolderTasks) For each item in ofolder.items set otaskitem = Item   ‘Check the status of the…

2

How to get Explorer & Inspector selected mail item using Outlook Object Model (OOM) & .Net?

In this article, we are going to see how we can get Explorer & Inspector selected mail item using Outlook Object Model (OOM) & .Net and process it. ‘[Code Snippet : VB.Net, .Net Framework 2.0/3.5, Outlook Object Model (OOM)] … ‘Declaration part Dim ThisOutlookSession As Outlook.Application = New Outlook.Application Dim NS As Outlook.NameSpace = ThisOutlookSession.Session…

1

Combining SQL Server tables and Exchange Web Services

Have you tried programmatically combining the two powerful enterprise tools: SQL Server 2005 (table-valued user-defined functions) with Exchange Server 2007(Exchange Web Services)? I followed the Microsoft article written by Jim Kleewein and Ray Dixon, which talks about how we can combine the SQL Server tables and Exchange Web Services to provide data from both Microsoft…

1

Exchange Server 2007 : Getting Mailbox statistics using C#.Net & Exchange Powershell

In this session, we will have a look about how to get the mailbox statistics information using from Exchange Server 2007 SP1 using C#.Net & Exchange Powershell. I tried the following code to get the mailbox statistics… 1: …. 2: //Create Runspaceconfiguraiton object 3: RunspaceConfiguration config = RunspaceConfiguration.Create(); 4: PSSnapInException snapEx = null; 5:  …


Exchange Server: How to retrieve appointments using C# & WebDAV?

Code Snippet (C#): //Declaration part string strExchSvrName = “”; string strMailbox = “”; string strCalendarUri = “”; string strDomain = “”; string strUserName = “”; string strPassword = “”; System.Net.HttpWebRequest WebDavRequest = null; System.Net.HttpWebResponse WebDavResponse = null; System.Net.CredentialCache MyCredentialCache = null; byte[] bytes = null; System.IO.Stream WebDavRequestStream = null;  // Provide the Exchange server name;…

1

How to authenticate the Inbox in Microsoft Exchange Server 2003 with forms-based authentication enabled?

Please find the Code Snippet Access Exchange Server 2003 using WebDAV in your Web application per KB: 1: ‘Declaration Section 2: Dim strServerName as String = “Server Name” ‘TODO: Change to your environment 3: Dim strDomain as String = “Domain Name”       ‘TODO: Change to your environment 4: Dim strUserID as String = “Username” ‘TODO: Change to…


Outlook programming : Looping individual mails inside the Inbox

1: ‘myLoop method 2: Sub myLoop() 3:   4: ‘Declaration 5: Dim olApp As Outlook.Application 6: Dim olNs As Outlook.NameSpace 7: Dim olFldr As Outlook.MAPIFolder 8: Dim olItms As Outlook.Items 9: Dim olMail As Object 10:   11: Set olApp = New Outlook.Application 12: Set olNs = olApp.GetNamespace("MAPI") 13: Set olFldr = olNs.GetDefaultFolder(olFolderInbox) 14: Set…

3