Le Café Central de

                 ... Deva blogs!!

  • Le Café Central de DeVa

    Tutorial : Organizational Forms Library - Series # 2


    Can we create it programmatically?

    To create it programmatically using MAPI, we need to make use of CreateFolder(), the MAPI function. It is necessary to have very special privileges (obtained by opening the store with an EntryID created using IExchangeManageStore::CreateStoreEntryID()) to get it to work.

    Please refer the following KB to create Org. forms library programmatically.

    How to create Org. Forms Library in Exchange Server 2003 ?

    To create a new Organizational Form in Exchange Server 2003, please follow the steps given below:

    1. Start Exchange System Manager.

    2. Expand the Organization object. Expand your Administrative Group.

    3. Expand Folders. Right-click Public Folders.

    4. Click View System Folders.

    5. In the list of folders present in the right-hand pane, click the EFORMS Registry folder.

    6. Right-click the EFORMS Registry folder, then click New. Click Organizational Form.

    7. Enter a name for your Organizational Form, and then click OK.

    8. Repeat these steps for multiple forms to create the library.

    How to create copies of organizational forms library?

    In Exchange Server 2003, to create copies of the Organizational Forms Library on other servers, click the Replication tab, and then type the name of server that you want to contain the copy of the Organizational Forms Library.

    2) How to set the storage limits for an organizational forms library?

    To set storage limits for an Organizational Forms Library, click the Limits tab. To create a description of an Organizational Forms Library, click the Details tab. To set permissions for each user, click the Permissions tab.

    How to create Org. Forms Library in Exchange Server 2007 ?

    Per the KB, you need to follow the following method to create an Organizational Forms Library as it got changed in Exchange 2007.

    To create an Organizational Forms Library in Exchange 2007, follow these steps.

    1. Create a new public folder.

    a. Click Start, point to All Programs, click Microsoft Exchange Server 2007, and then click Exchange Management Shell.

    b. Run the following command at the Exchange Management Shell prompt:
    New-PublicFolder -Path "\NON_IPM_SUBTREE\EFORMS REGISTRY" -Name "My Organizational Forms Library"

    Note: You can use the Exchange management shell on any version of Exchange 2007 to create a folder. However, in Exchange 2007 SP1, you can also create the EFORMS REGISTRY folder by following these steps:

                a. Go to Toolbox in Exchange Management Console. Double-click Public Folder Management Console.

                b. In the left pane, click System Public Folders.

                c. in the Action pane, click New Public Folder. Type EFORMS REGISTRY as the folder name, and then click NEW.

                d. After the folder is created, click Finish to exit the wizard.

    2. Add the PR_EFORMS_LOCALE_ID.

    a. Use an account that belongs to the Exchange Administrators Group to log on to a client computer that is running Microsoft Office Outlook 2003 or a later version of Microsoft Outlook.

    b. Start the Microsoft Exchange Server MAPI Editor (Mfcmapi.exe) from the MFCMAPI folder.

    c. Create a MAPI profile if it is necessary.

    d. On the Session menu, click Logon and Display Store Table.  Select MDB menu, click Open Public Folder Store, and then click OK.

    e. Expand Public Root, expand NON_IPM_SUBTREE, and then expand EFORMS REGISTRY.

    f. Click the public folder that you created in step 1. For example, click My Organizational Forms Library.

    g. Click the PR_URL_NAME property. On the Property Pane menu, click Modify Extra Properties. Click Add, and then click Select Property Tag.

    h. Click PR_EFORMS_LOCALE_ID in the list, and then click OK. Click OK two times. A red mark is displayed next to the newly created PR_EFORMS_LOCALE_ID property.

    i. Double-click PR_EFORMS_LOCALE_ID. In the Unsigned Decimal box, type the desired locale ID, and then click OK. For example, type 1033 for English, type 1040 for Italian, or type a different ID for a different locale.
    Note: To determine the locale ID for other locales, visit the following Microsoft Web site: http://msdn2.microsoft.com/en-us/library/aa579489.aspx (http://msdn2.microsoft.com/en-us/library/aa579489.aspx)

    j. Exit MAPI Editor.

    3. Configure limits and permissions for the Organizational Forms Library folder. Note: You can use suitable cmdlets in the Exchange Management Shell to set limits and permissions for the Organizational Forms Library folder.

    a. To set storage limits, use the following cmdlet: Set-PublicFolder

    b. To set permissions for each user, use the following cmdlets: Add-PublicFolderClientPermission, Add-PublicFolderAdministrativePermissions

  • Le Café Central de DeVa

    Outlook Programming: How to retrieve unread messages from any Outlook folder?

    Recently one of my customer updated that he got a requirement to programmatically retrieve unread messages from any Outlook folder to be implemented part of his application. We tried the following steps -  Will show you how you can programmatically retrieve unread messages from any Outlook folder using Outlook Object Model (OOM) API.

    Let we first have a look at the following code snippet (C#.Net):
    Outlook.MAPIFolder Fldr = this.Application.ActiveExplorer().Session.GetDefaultFolder
    Outlook.Items UnReads = Fldr.Items.Restrict("[Unread]=true");
    MessageBox.Show(string.Format("Unread items in Inbox = {0}", UnReads.Items.Count));

    Line # 1, we need to specify target Outlook folder that we need to read messages. Here I used Inbox.
    Line # 2, we need to filter target folder items using Restrict filter as Unread]=true to get unread items
    Line # 3, displaying the number of unread items.

    Please note: In order to retrieve unread messages from any Outlook folder, just point out the target folder in the Line # 1, instead of Inbox.

    Pretty simple isn’t it Winking smile

  • Le Café Central de DeVa

    Installing Ubuntu 10.10 on Windows Server 2008 R2 Hyper-V


    I used the following steps to install Ubuntu (10.10) version in the my Windows Server 2008 R2 Hyper-V machine.

    1) Created a new Hyper-V machine

    2) Downloaded the latest Ubuntu ISO. You can notice few options on this page:

    (a) Download Desktop Edition – I used this.
    (b) Burn your CD or create a USB drive
    (c) You can try it before you install it

    3) Create a legacy Network driver and associate it with the above Hyper-V machine

    4) Select the Ubuntu ISO by the following option: Hyper-V –> Media –> DVD Drive –> Insert Disk

    5) Started the Ubuntu Hyper-V and mount with above ISO


    6) Select the options to Install Ubuntu and its configuration. For the disk management, you can use the entire drive or customize the drive partition as per your requirement.



    One it’s installed, it will request you to restart. During the time, make sure to remove the above mounted ISO drive.


    I would rate the installation is pretty straight, works fine with all the drivers. I haven’t faced any glitches during the above work and loads with 640 * 480 display configuration.

    Bingo. Enjoy!!

  • Le Café Central de DeVa

    Visual Studio 2013 Update 4 now available for download and related channel 9 video…


    Now you can download Visual Studio 2013 Update 4. Visual Studio 2013 updates are cumulative releases. The following download links always direct you to the latest update:

    If you do not have Visual Studio 2013 (original-release version), then run one of the following downloads, both Visual Studio 2013 and Update 4 are installed.

    This update includes the latest software updates and feature additions. New Technology improvements in Visual Studio 2013 Update 4 is listed in http://support.microsoft.com/kb/2994375.

    In addition to that you can have a look at the below Channel 9 video featuring Robert and Dmitry Lyalin – along with special guests Aaron Bjork and Rong Lu from the engineering team – take you through the many new features, highlighting and demoing web editor improvements (HTML, CSS, JSON), various new capabilities in Team Foundation Server such as Git pull requests, updated tooling for Azure WebJobs and the new GPU usage analyzer etc.

  • Le Café Central de DeVa

    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
    Debug.Print "Total Items available in Folder : " & ofolder.Items.Count
    For Each Item In ofolder.Items
    Set omailitem = Item
    Debug.Print "Item Subject :" & omailitem.Subject & " Size (in bytes):" & omailitem.Size
    If omailitem.Attachments.Count > 0 Then
    For Each oattach In omailitem.Attachments
    If oattach.Type = Outlook.olByReference Then
    Debug.Print "By reference : " & oattach.FileName & " Size (in bytes) : " & oattach.Size
    ElseIf oattach.Type = Outlook.olByValue Then
    Debug.Print "By Value : " & oattach.FileName & " Size (in bytes) : " & oattach.Size
    ElseIf oattach.Type = Outlook.olEmbeddeditem Then
    Debug.Print "Embedded item : " & oattach.FileName & " Size (in bytes) : " & oattach.Size
    ElseIf oattach.Type = Outlook.olOLE Then
    Debug.Print "OLE : " & oattach.FileName & " Size (in bytes) :" & oattach.Size
    End If
    Debug.Print "-------------------"
    End If

    - olByReference The attachment is a shortcut to the location of the original file.
    - olByValue The attachment is a copy of the original file and can be accessed even if the original file is removed.
    - olEmbeddeditem The attachment is an Outlook message format file (.msg) and is a copy of the original message.
    - olOLE The attachment is an OLE document

    You can also get more info from : http://msdn.microsoft.com/en-us/library/aa220737(office.11).aspx

    Result will be like this (sample data provided for your view):

    Total Items available in Folder : 3
    Item Subject :Fw: Mormons and Roses - A "Cheers" TV Show ClipSize (in bytes):4057344
    By Value : Mormonscantsendflowers_1.wmvSize (in bytes) : 4054264
    Item Subject :Rate spectrum on exotic position JEX and JNKSize (in bytes):2537614
    By Value : JNK_JEX_IR.xls Size (in bytes) : 2525885
    Item Subject :Fw: Blue Angles in San Francisco(May be a repeat)Size (in bytes):741293
    By Value : image001.jpg Size (in bytes) : 61862
    By Value : image002.jpg Size (in bytes) : 59804
    By Value : image003.jpg Size (in bytes) : 81551
    By Value : image004.jpg Size (in bytes) : 48063
    By Value : image005.jpg Size (in bytes) : 62174
    By Value : image006.jpg Size (in bytes) : 55008
    By Value : image007.jpg Size (in bytes) : 76879
    By Value : image008.jpg Size (in bytes) : 42201
    By Value : image009.jpg Size (in bytes) : 45637
    By Value : image010.jpg Size (in bytes) : 56987
    By Value : image011.jpg Size (in bytes) : 2308
    By Value : image012.jpg Size (in bytes) : 97229
    By Value : image013.jpg Size (in bytes) : 28169

  • Le Café Central de DeVa

    New Outlook Hotmail Connector 14.0 (Outlook Connector) for Outlook 2010 Beta


    I am an avid fan of using MS Outlook connector with previous versions of Outlook. Earlier when i was using Outlook Connector 12.1, i can manage my Windows Live Hotmail e-mail, calendar, and contacts from within Outlook.  Recently i read blog post by Alessio, that MS had announced the Beta release of Microsoft Outlook Hotmail Connector 14.0 (previously called Outlook Connector) in parallel with the Outlook 2010 Beta. It’s really a nice thing to hear.

    What’s new? Outlook Hotmail Connector 14.0 Beta is compatible with Outlook 2003 and 2007, and will replace Outlook Connector 12.1 upon release and provides an improved authentication and synchronization experience.

    Better with Outlook 2010: With Outlook Hotmail Connector 14.0 and Outlook 2010, you gain these additional benefits:

    • Junk filter settings Your Safe Sender List/Blocked sender list/Safe Recipient lists are synchronized between Outlook and Hotmail.
    • Integrated Send/Receive Send/receive works like your other Outlook accounts.
    • Integrated connection status Your Hotmail account status appears in the Outlook status bar.
    • Rule support for secondary accounts Rules work with the Hotmail account in Outlook even if it’s not your primary account.

    Where to download & use the Outlook Hotmail Connector 14.0 Beta: To download the Outlook Hotmail Connector 14.0 Beta manually, go to the Microsoft Download Center.

    Outlook Hotmail Connector 14.0 for Outlook 2003, 2007 and 2010 32-bit

    Outlook Hotmail Connector 14.0 for Outlook 2010 64-bit

    Try this out. Start enjoy with Hotmail Connector and save more time!!

  • Le Café Central de DeVa

    Exchange throttling: MAPI application fails with error “The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]”


    We recently resolved a case where a customer tries accessing Exchange Server 2010 mailboxes (DAG) via their custom Exchange MAPICDO based application. On average 2-3 days once, they're frequently facing an error “The information store could not be opened. [MAPI 1.0 - [MAPI_E_LOGON_FAILED(80040111)]]” while attempting to connect to Exchange server 2010. After some days of normal working, Exchange server starts to refusing their connector to open the users' mailboxes. Whenever they notice this error, the application just fails and they need to restart the app to make it work.

    During debugging, we haven’t noticed any issues logged Exchange Server’s event viewer and MPS also looked fine. We took memory dump and analyzed RCA logs, which pointed client throttling policy.

    Earlier, Steve had blogged an excellent article on this. So first we need to understand more about Exchange Client throttling, a feature which got introduced in Exchange Server 2007. Exchange server 2007/2010 allows many clients to connect via Outlook, MAPI, ActiveSync, Outlook Anywhere, OWA ,IMAP  or  POP3, to their Mailboxes through the (CAS) Client Access Server role. Throttling policies are used to restrict clients in the Exchange Server resources they can use. The purpose of these restrictions is to make sure a client can’t bring down an Exchange Server or disrupt services for other clients, intentionally or unintentionally, by exhausting resources. Thus, throttling will also help in lowering the impact of denial-of-service attacks. Because the limit is enforced on clients, and clients can connect to their mailbox simultaneously using different components, throttling policies are applied to mailboxes.

    Note: By default the mailbox attribute ThrottlingPolicy is not set, meaning the default throttling policy will be used (refer the below pic):

    Default Throttling Policy

    Once the ThrottlingPolicy is set, it will be shown like the below:

    Modified Throttling Policy

    You have to use the exchange shell to manage throttling policies with the New-ThrottlingPolicy, Get-ThrottlingPolicy, Set-ThrottlingPolicy & Remove-ThrottlingPolicy cmdlets. We pointed them to fix it by creating/modifying client throttling policy – it helped them to move ahead.

  • Le Café Central de DeVa

    KB : Application support for WEBDAV to access Exchange Server?


    Exchange Server 2003Do you know the support that is available for applications that use the Web Distributed Authoring and Versioning (WebDAV) protocol to access Microsoft Exchange 2000 Server or Microsoft Exchange Server 2003 ?


    What is supported?

    Microsoft support the use of the WebDAV protocol for the following items:

    •Non-recurring appointments
    •Contacts in Microsoft Outlook that you create or modify
    •Folders that you create in Outlook and in Exchange 2000 Server or Exchange Server 2003
    •E-mail messages that you create or modify

    You cannot use the WebDAV protocol to access the Rich Text Format (RTF) body of an e-mail message.

    All other tasks that use the WebDAV protocol to modify a Web store in Exchange 2000 Server or in Exchange Server 2003 are not supported.
    Note These limitations do not apply to Outlook Web Access URLs.

    Why it's not supported?

    Because of limitations that exist when you create items that are compatible with Outlook, we do not support complex calendaring when you use the WebDAV protocol. Complex calendaring applications include the following items:

    •Recurring appointments
    •Meeting functionality
    Note Meeting functionality includes sending, modifying, and canceling meetings.

    What are the alternatives?

    For applications that require complex calendaring functionality with Exchange 2000 Server or with Exchange Server 2003, we recommend that you use the following API's:

    •Collaboration Data Objects for Exchange 2000 Server (CDOEX)
    •Collaboration Data Objects (CDO) 1.21
    •Outlook Object Model

    These API's include additional logic that is required to make the created items work correctly with Outlook. This additional logic is not available when you use the WebDAV protocol. for more information please find the following MSDN KB.

  • Le Café Central de DeVa

    Download: EWS Managed API 1.1


    If you use EWS (Exchange Web Services) Managed API 1.0 or 1.1 beta, then its time for downloading its latest update: EWS Managed API 1.1 (Version 14.02.0051.000)

    The Microsoft Exchange Web Services (EWS) Managed API 1.1 provides a managed interface for developing client applications that use Exchange Web Services. The EWS Managed API simplifies the implementation of applications that communicate with Microsoft Exchange Server 2007 Service Pack 1 (SP1) and later versions of Microsoft Exchange. Built on the Exchange Web Services SOAP protocol and Autodiscover, the EWS Managed API provides a .NET interface to EWS that is easy to learn, use, and maintain.

    You can download it from http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c3342fb3-fbcc-4127-becf-872c746840e1

    1) For x64 (64-bit) computers, download and run EwsManagedApi.msi
    2) For x86 (32-bit) computers, download and run EwsManagedApi32.msi
    3) Requires Microsoft .NET Framework 3.5 and Microsoft Visual Studio 2008 or later

  • Le Café Central de DeVa

    Creating Outlook Calendar Folder using WebDAV & C#.Net


    Code snippet to create Outlook Calendar Folder using WebDAV & C#.Net

    // TODO: Replace with the URL of an object on Exchange Server
            string sUri = "http://ExchServer/Exchange/Administrator/Inbox/NewApptFolder";
            System.Uri myUri = new System.Uri(sUri);
            HttpWebRequest HttpWRequest = (HttpWebRequest)WebRequest.Create(myUri);

            string sQuery;
            sQuery = "<?xml version='1.0'?>" +
              "<a:propertyupdate xmlns:a='DAV:' " +
              "xmlns:ex='http://schemas.microsoft.com/exchange/'>" +
              "<a:set><a:prop>" +
              "<ex:outlookfolderclass>IPF.Appointment</ex:outlookfolderclass>" +
              "</a:prop></a:set>" +

            // Set Credentials
            // TODO: Replace with appropriate user credentials

            NetworkCredential myCred = new NetworkCredential(@"DomainName\UserName", "UserPassword");
            CredentialCache myCredentialCache = new CredentialCache();
            myCredentialCache.Add(myUri, "Basic", myCred);
            HttpWRequest.Credentials = myCredentialCache;

            // Set Headers
            HttpWRequest.KeepAlive = false;
            HttpWRequest.Headers.Set("Pragma", "no-cache");
            HttpWRequest.ContentType =  "text/xml";
            HttpWRequest.ContentLength = sQuery.Length;

            //Set the request timeout to 5 minutes
            HttpWRequest.Timeout = 300000;
            // Set the request method
            HttpWRequest.Method = "MKCOL";

            // Store the data in a byte array
            byte[] ByteQuery = System.Text.Encoding.ASCII.GetBytes(sQuery);
            HttpWRequest.ContentLength = ByteQuery.Length;
            Stream QueryStream = HttpWRequest.GetRequestStream();
            // Write the data to be posted to the Request Stream

            // Send Request and Get Response
            HttpWebResponse HttpWResponse = (HttpWebResponse)HttpWRequest.GetResponse();

            // Get the Status code
            int iStatCode =  (int)HttpWResponse.StatusCode;
            string sStatus = iStatCode.ToString();
            Console.WriteLine("Status Code: {0}", sStatus);
            // Get the request headers
            string sReqHeaders = HttpWRequest.Headers.ToString();

            // Read the Response Steam
            Stream strm = HttpWResponse.GetResponseStream();
            StreamReader sr = new StreamReader(strm);
            string sText = sr.ReadToEnd();
            Console.WriteLine("Response: {0}", sText);

            // Close Stream

            // Clean Up
            myCred = null;
            myCredentialCache = null;
            HttpWRequest = null;
            HttpWResponse = null;
            QueryStream = null;
            strm = null;
            sr = null;

    Note: This code snippet shows how to use WebDAV to create a Microsoft Outlook Calendar folder.

    • It initially sets the method of the HttpWebRequest class to "MKCOL"
    • Then sends the request with the user credentials to the Exchange server.
    • It uses the HttpWebResponse method to receive the response.

    The HttpWebRequest and the HttpWebResponse methods are available in the System.Net namespace

  • Le Café Central de DeVa

    Exchange Server 2007 : Getting Mailbox statistics using C#.Net &amp; 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;
       6:  //Add it to the Powershell SnapIn
       7:  PSSnapInInfo info = config.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.Admin", out snapEx);
       9:  //Create a Runspace
      10:  Runspace space = RunspaceFactory.CreateRunspace(config);
      12:  //Supply the Command & its relevant parameters collection
      13:  Command createcmd = new Command(@"Get-Mailboxstatistics testmailbox");
      14:  createcmd.Parameters.Add("server", "servername");
      16:  //Create the collection & invoke the pipe
      17:  pipe.Commands.Add(createcmd);
      18:  Collection<PSObject> results = null;
      19:  results = pipe.Invoke();
      20:  ....
  • Le Café Central de DeVa

    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    
        ' Obtain a NameSpace object reference
        Set objNameSpace = Application.GetNamespace("MAPI")
        'Add the Category, set its color and shortcutkey, if any
        Set objCategory = objNameSpace.Categories.Add("SampleCat", OlCategoryColor.olCategoryColorDarkBlue, 
       ' Clean up
        Set objCategory = Nothing
        Set objNameSpace = Nothing
    End Sub
    Happy programming!!
  • Le Café Central de DeVa

    Migration: Exchange Public folders and its future


    Public Folders are used in earlier versions of Microsoft Exchange Server to store free/busy data and files. From Microsoft Exchange Server 2007, free/busy data is no longer stored in public folders. It’s recommend that you do not store files in public folders in Exchange 2007. Instead, consider using Microsoft Office SharePoint, or Windows SharePoint Services. Public folders are included and supported in Exchange 2007 and 2010. However, future releases of Microsoft Exchange might not include public folders. You can visit http://blogs.technet.com/b/exchange/archive/2006/02/20/419994.aspx. Also, you can refer MS Exchange team blog have posted the updated public folder guidance for versions of Exchange past Exchange 2007.

    So, what are my options?

    If you're building something new, you should look at the requirements and building on the SharePoint Technologies platform:

    + Starting with Exchange 2007, we recommend that applications use the Availability service to provide free/busy data for Exchange mailbox users. Windows SharePoint Services replaces the file sharing functionality that public folders provide. You must redesign applications that use public folders to use Exchange Web Services.
    + Also consider redesigning custom applications as early as possible as future versions of Microsoft Exchange may not contain public folders.
    + In addition to that you can refer the wonderful blogpost by Joel.

  • Le Café Central de DeVa

    Download: Outlook 2007 Add-ins & code samples


    Whenever we discuss with regards to Outlook Add-in customization, many of our customer(s) or their developers want to customize it according to their requirements. Also they look for the code-samples, related articles to proceed further. In this discussion, i have added couple of Outlook 2007 specific add-ins, code samples along with their download links.

    Please download the following Outlook add-ins along with the code-samples:

    Outlook 2007 Add-Ins: RulesAddin, TravelAgencyAddin, and PrepareMeAddin
    Download: http://www.microsoft.com/downloads/details.aspx?FamilyId=F871C923-3C42-485D-83C7-10A54A92E8A2&displaylang=en

    Please note: The Outlook 2007 Sample Add-Ins are a learning tool that will help you understand some of the important new features in the Outlook 2007 object model. Each sample is available in a version for Visual Studio 2005 Tools for Office Second Edition (VSTO 2005 SE) in addition to the version based on the Outlook 2007 Sample: Visual Studio 2005 Templates.

    They provide coverage of the following important new areas:

    • Using the Rules object model, which allows you to programmatically create or access most rules supported by the Outlook Rules Wizard (Rules sample)
    • Implementing a form region for an Outlook contact item (Travel Agency sample)
    • Adding a custom task pane to an Outlook AppointmentItem (Prepare Me sample)
    Outlook 2007 Sample: Ribbon Extensibility Add-In
    Download: http://www.microsoft.com/downloads/details.aspx?FamilyID=11ab93bf-48dc-4f73-8f6b-62b4482a92bc&displaylang=en

    Please note: The Outlook 2007 Ribbon Extensibility Add-In is a learning tool that will help you understand how to customize the Ribbon for Outlook Inspector windows. It provides coverage of the following important new areas:

    • How legacy command bar customizations appear in an Outlook Inspector window
    • How to implement the Office.IRibbonExtensibility interface in an Outlook add-in
    • Providing Ribbon markup for Ribbon customization depending on the RibbonID string passed in the GetCustomUI callback
    • Using the IRibbonControl.Context object to find an instance of an Inspector object
    • Changing the state of Ribbon controls depending on the PropertyChange event for an Outlook item.
    Outlook 2007 Sample: Visual Studio 2005 Templates
    Download: http://www.microsoft.com/downloads/details.aspx?familyid=0cab159a-0272-4635-b158-10553779a3df&displaylang=en

    Please note: The Outlook 2007 Add-in Templates provide a basic template for developing Outlook 2007 add-ins using Visual Studio 2005. The templates are available in both Visual Basic and Visual C# languages. Each template includes the OutlookItem class, which enables developers to work with generic Outlook items through late-binding, without determining the item type first.

    The templates also include wrapper classes that enable you to track multiple Outlook Inspector or Explorer windows. The templates provide an alternative to the Outlook add-in templates available with Microsoft Visual Studio 2005 Tools for the 2007 Office system (VSTO 2005 Second Edition). VSTO 2005 SE is the preferred tool for developing add-ins for Outlook 2007. If you choose to build your add-in by using the Outlook 2007 Add-In Templates, you must add a COM Shim project and a Setup project to your add-in solution.

    Outlook 2007 Add-In: Form Region Add-In
    Download: http://www.microsoft.com/downloads/details.aspx?familyid=932b830f-bf8f-41fc-9962-07a741b21586&displaylang=en

    Please note: The Outlook 2007 Form Region Add-ins are a learning tool that will help you understand how to design, build, and run custom form solutions based on Outlook form regions. They provide coverage of the following important new areas:

    • Tracking the state of a form region across multiple windows
    • Implementing the FormRegionStartup interface in an Outlook add-in
    • Understanding the form region manifest XML
    • Registering a form region with Outlook
    • Storing form components as a project resource
    • Deploying a form region solution
    Outlook 2007 Sample: What's New Add-Ins
    Download: http://www.microsoft.com/downloads/details.aspx?FamilyId=AABF127D-D069-4549-A1B1-667A698C3EF6&displaylang=en

    Please note: The Outlook 2007 What's New Add-Ins are a learning tool that will help you understand some of the important new features in the Outlook 2007 object model. They provide coverage of the following important new areas:

    • Context menu customization
    • The Table object model and Instant Search queries
    • The PropertyAccessor object that allows getting or setting properties that are not explicitly exposed in the Outlook object model
    • The Rules object model that allows programmatically creating or accessing most rules supported by the Outlook Rules Wizard
    • The SelectNamesDialog object that displays the Outlook Address Book and lets you customize the dialog caption and recipient selectors
    • Enhancements to the AddressEntry and AddressList objects, including the ExchangeUser and ExchangeDistributionList objects that allow getting and setting properties of an Exchange user or Exchange distribution list.
  • Le Café Central de DeVa

    Virtual Classroom : Building Web Apps with ASP.NET Jump Start


    Hi there,

    You can join this Jump Start session provided by Microsoft Virtual Academy – it’s tailored for experienced application developers interested in leveraging ASP.NET and Visual Studio 2012 to offer modern apps that target modern browsers. Two of Microsoft’s most seasoned ASP.NET speakers, Scott Hanselman and Jon Galloway, will provide an accelerated introduction to building modern web applications with ASP.NET 4.5 and ASP.NET MVC 4. In this course, they will target key scenarios like building mobile ready websites, social web applications as well as modern HTML5 browser features.

    Technologies Covered

         •  New and advanced features in ASP.NET Web Forms
          •  ASP.NET MVC 4 and ASP.NET Web API
          •  jQuery
          •  SignalR
          •  Entity Framework
          •  Visual Studio 2012
          •  Internet Explorer 10 and HTML5
          •  Building apps for Office with HTML5
          •  Windows Azure Web Sites for ASP.NET developers


    February 19, 2013
    8:00am-5:00pm PST

    Register: In order to participate you need to register first.
    Where : Live online
    What  : Engaging, demo virtual class
    Cost  : Free
    Target Audience: Intended for developers who have at least six months of professional experience.

    Hope this helps.

  • Le Café Central de DeVa

    Exchange Management Shell : Changing DisplayName format “LastName, FirstName”


    As we know by default the Display Name of Exchange Mailboxes(Exchange Server 2007 SP2) is in the format of “Firstname Lastname”. I want to change this for the couple of existing mailboxes to “Lastname, Firstname” for one my customer – he preferred non-development stuff!!

    I tried to do the same using the Exchange Management Shell, which fits for my requirement:
    > Get-Mailbox “User Name” | Get-User | ?{ $_.Lastname -ne $null } | %{ $dispName=$_.LastName + “, ” + $_.FirstName ; set-mailbox $_.SamAccountName -Displayname $dispName }

    In case you want to revert back to the format “Firstname Lastname”, here’s the command for that.
    > Get-Mailbox “User Name” | Get-User | ?{ $_.Lastname -ne $null } | %{ $dispName=$_.FirstName + ” ” + $_.LastName ; set-mailbox $_.SamAccountName -Displayname $dispName }

    You can try this out…

  • Le Café Central de DeVa

    Download: .Net Universe 2013 Poster


    You can download the .Net Universe 2013 poster. This Poster showing the main .NET SDKs, libraries and packages classified by application type and package type (NuGet, official support, etc.).
    .Net Universe 2013 Poster
    This poster shows how the trends are changing in .NET as we´re moving from a single large .NET Framework to a more loosely coupled and autonomous libraries and sub-frameworks, many of them even published as NuGet packages and evolving continuously. The number of those libs and packages is evolving and growing, so having a visual photo of it can be helpful. The main idea of the poster is to show that you can create any kind of application with .NET, from the largest applications to the smaller apps: in the cloud, on the web, on desktops, tablets, phones, and in embedded environments (even watches!). Any of those application types is shown as category/bucket in the poster and within each bucket we´re tossing the main libraries/SDKs/packages out. Then we´re also showing cross-cutting concerns buckets like Security, Data Access, and .NET Extension libs. The main categories are the following: - Emerging application patterns (Mobile, Web & Cloud) - Established application patterns (Desktop and Embedded) - Cross-Cutting concerns Finally, the poster is putting a check/mark on every lib/SDK bullet depending if they are or not complaint with the following: - NuGet package - Open Source - Microsoft Official Supported You can print it out or use it as in electronic format (.PDF). Using the electronic format (.PDF) allows you to access each content URL/page related.

  • Le Café Central de DeVa

    Adding delegates in Exchange Web Services (Exchange Server 2007 SP1)


    Delegates & Exchange Web Services 

    In Microsoft Exchange Server 2007 SP1, you can use Exchange Web Services to add, update, and remove delegates.

    Code sample

    Please find the code example that shows you how to add delegates that can take actions on behalf of a principal. In this code it shows how to add two delegate users to an account.

    static void AddDelegate()
        // Set the version, credentials, and Client Access server on ExchangeServiceBinding.
        ExchangeServiceBinding esb = new ExchangeServiceBinding();
        esb.RequestServerVersionValue = new RequestServerVersion();
        esb.RequestServerVersionValue.Version = ExchangeVersionType.Exchange2007_SP1;
        esb.Credentials = new NetworkCredential("username", "password", "domain");
        esb.Url = "https://example.com/ews/exchange.asmx";

        // Create the request.
        AddDelegateType request = new AddDelegateType();

        // Identify the principal's mailbox.
        request.Mailbox = new EmailAddressType();
        request.Mailbox.EmailAddress = "user1@example.com";

        // Identify the delegates who are given access to the principal's mailbox.
        request.DelegateUsers = new DelegateUserType[2];
        request.DelegateUsers[0] = new DelegateUserType();
        request.DelegateUsers[0].UserId = new UserIdType();
        request.DelegateUsers[0].UserId.PrimarySmtpAddress = "user2@example.com";
        request.DelegateUsers[1] = new DelegateUserType();
        request.DelegateUsers[1].UserId = new UserIdType();
        request.DelegateUsers[1].UserId.PrimarySmtpAddress = "user3@example.com";
        // Specify the permissions that are granted to each delegate.
        request.DelegateUsers[0].DelegatePermissions = new DelegatePermissionsType();
        request.DelegateUsers[0].DelegatePermissions.CalendarFolderPermissionLevel = DelegateFolderPermissionLevelType.Reviewer;
        request.DelegateUsers[0].DelegatePermissions.CalendarFolderPermissionLevelSpecified = true;
        request.DelegateUsers[1].DelegatePermissions = new DelegatePermissionsType();
        request.DelegateUsers[1].DelegatePermissions.TasksFolderPermissionLevel = DelegateFolderPermissionLevelType.Author;
        request.DelegateUsers[1].DelegatePermissions.TasksFolderPermissionLevelSpecified = true;
        request.DelegateUsers[1].DelegatePermissions.InboxFolderPermissionLevel = DelegateFolderPermissionLevelType.Editor;
        request.DelegateUsers[1].DelegatePermissions.InboxFolderPermissionLevelSpecified = true;

        // Specify whether the principal recieves meeting requests.
        request.DeliverMeetingRequests = DeliverMeetingRequestsType.DelegatesAndSendInformationToMe;
        request.DeliverMeetingRequestsSpecified = true;

            // Send the request and get the response.
            AddDelegateResponseMessageType response = esb.AddDelegate(request);
            DelegateUserResponseMessageType[] responseMessages = response.ResponseMessages;

            // One DelegateUserResponseMessageType exists for each attempt to add a delegate user to an account.
            foreach (DelegateUserResponseMessageType user in responseMessages)
                Console.WriteLine("Results of adding user: " + user.ResponseClass.ToString());
                if (user.DelegateUser.ReceiveCopiesOfMeetingMessagesSpecified)
                    Console.WriteLine("Does the delegate receive copies of meeting related messages: " + user.DelegateUser.ReceiveCopiesOfMeetingMessages);
                if (user.DelegateUser.ViewPrivateItemsSpecified)
                    Console.WriteLine("Can the delegate view private items in the principal's mailbox: " + user.DelegateUser.ViewPrivateItems);
        catch (Exception e)

    For more information refer this article

  • Le Café Central de DeVa

    Get all mailbox information from WMI &amp; C#.Net


    In one scenario, there was a need for me to get all mailbox related information using WMI and C#.Net.

    Here is a code snippet to get all mailbox information from an Exchange Server - WMI & C#.Net.

    using System;
    using System.Management;

    namespace ConsoleTwo
        class Class1

            static void Main(string[] args)
                    System.Management.ConnectionOptions objcon = new System.Management.ConnectionOptions();
                     objcon.Impersonation = ImpersonationLevel.Impersonate;
                    // Exchange Server Name
                    string cServername = "Server Name";
                    // Create a management scope into Exchange WMI namespace
                    System.Management.ManagementScope exScope =
                        new System.Management.ManagementScope(@"\\" + cServername + @"\root\MicrosoftExchangeV2", objcon);

                    // Create a query to get the data from the Exchange WMI
                    System.Management.ObjectQuery objQry =
                        new System.Management.ObjectQuery("SELECT * FROM Exchange_Mailbox");

                    // Retrieves a collection of management objects based on the query.
                    System.Management.ManagementObjectSearcher objSrch =
                        new System.Management.ManagementObjectSearcher(exScope, objQry);
                    System.Management.ManagementObjectCollection qryCol = objSrch.Get();

                     // Loop each item in the collection
                    foreach (System.Management.ManagementObject mailBox in qryCol)
                         Console.WriteLine("{0} {1} {2}", mailBox["MailboxDisplayName"].ToString() , mailBox["TotalItems"].ToString() , mailBox["size"].ToString() );
                catch (Exception eVal)
                    Console.Write(eVal.InnerException + eVal.Message + eVal.Source + eVal.StackTrace );

  • Le Café Central de DeVa

    Outlook Programming : How to get the SMTP Address of the Sender of a Mail Item using Outlook Object Model?


    Recently I was assisting an developer who used Outlook Object Model (OOM) API and tried to get the SMTP address of the Sender of a given mail item.

    In order to get the values, he first made the following OOM call – it worked fine for him for couple of mail items, but fails to get the SMTP value as given below:

       1: mailItem.Recipients[i].Address 
    It returned the value as,

    In this scenario, to determine the SMTP address for a mail item, you can use the SenderEmailAddress property of the MailItem object. However, if the sender is internal to your organization, SenderEmailAddress does not return an SMTP address, and you must use the PropertyAccessor object to return the sender’s SMTP address (adding the related C#.Net code for your reference).

       1: private string GetSMTPAddress(Outlook.MailItem mail)
       2: {
       3:     string PR_SMTP_ADDRESS = @"http://schemas.microsoft.com/mapi/proptag/0x39FE001E";
       4:     if (mail.SenderEmailType == "EX")
       5:     {
       6:         Outlook.AddressEntry sender =
       7:             mail.Sender;
       8:         if (sender != null)
       9:         {
      10:             //Now we have an AddressEntry representing the Sender
      11:             if (sender.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeUserAddressEntry
      12:                 || sender.AddressEntryUserType == Outlook.OlAddressEntryUserType.olExchangeRemoteUserAddressEntry)
      13:             {
      14:                 //Use the ExchangeUser object PrimarySMTPAddress
      15:                 Outlook.ExchangeUser exchUser = sender.GetExchangeUser();
      16:                 if (exchUser != null)
      17:                 {
      18:                     return exchUser.PrimarySmtpAddress;
      19:                 }
      20:                 else
      21:                 {
      22:                     return null;
      23:                 }
      24:             }
      25:             else
      26:             {
      27:                 return sender.PropertyAccessor.GetProperty(PR_SMTP_ADDRESS) as string;
      28:             }
      29:         }
      30:         else
      31:         {
      32:             return null;
      33:         }
      34:     }
      35:     else
      36:     {
      37:         return mail.SenderEmailAddress;
      38:     }
      39: }

    This will help you to move ahead and get the correct SMTP address:


    Happy Programming!!

  • Le Café Central de DeVa

    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 specific Taskitem is "Completed" or not
    if otaskitem.Status = olTaskcomplete then
    'Msgbox "Completed Tasks"
    'Msgbox "Not Completed Tasks"
    end if
  • Le Café Central de DeVa

    How to : Determine the version number, build number & the service pack of Exchange Server?


    Determine version number of Exchange:
    To determine the version number, the build number, and the service pack level of a Microsoft Exchange Server computer, check the following properties of the server.

    If you have Exchange Server 4.0, Exchange Server 5.0, or Exchange Server 5.5 then you can, follow these steps:

    1. Start the Microsoft Exchange Administrator program.
    2. In the left pane, expand the objects until you locate the server object, and then click the server object.
    3. On the File menu, click Properties.
    If you have Microsoft Exchange 2000 Server or Microsoft Exchange Server 2003 computer, then follow these steps:
    1. Start the Microsoft Exchange Administrator program.
    2. In the left pane, expand the objects until you locate the server object.
    3. Right-click the server object, and then click Properties.

    Build numbers and version numbers of the Exchange Server:
    Each version of Microsoft Exchange Server has a different build number. The following table lists the build numbers and general release dates for each version.


    Build number

    Release date




    Microsoft Exchange Server  4.0


    April 1996

    Microsoft Exchange Server  4.0 (a)


    August 1996

    Microsoft Exchange Server  4.0 SP1


    May 1996

    Microsoft Exchange Server  4.0 SP2


    August 1996

    Microsoft Exchange Server  4.0 SP3


    November 1996

    Microsoft Exchange Server  4.0 SP4


    April 1997

    Microsoft Exchange Server  4.0 SP5


    May 1998




    Microsoft Exchange Server  5.0


    March 1997

    Microsoft Exchange Server  5.0 SP1


    June 1997

    Microsoft Exchange Server  5.0 SP2


    February 1998




    Microsoft Exchange Server  5.5


    November 1997

    Microsoft Exchange Server  5.5 SP1


    July 1998

    Microsoft Exchange Server  5.5 SP2


    December 1998

    Microsoft Exchange Server  5.5 SP3


    September 1999

    Microsoft Exchange Server  5.5 SP4


    November 2000




    Microsoft Exchange 2000 Server


    October 2000

    Microsoft Exchange 2000 Server (a)


    January 2001

    Microsoft Exchange 2000 Server SP1


    July 2001

    Microsoft Exchange 2000 Server SP2


    December 2001

    Microsoft Exchange 2000 Server SP3


    August 2002

    Microsoft Exchange 2000 Server post-SP3


    September 2003

    Microsoft Exchange 2000 Server post-SP3


    April 2004

    Microsoft Exchange 2000 Server post-SP3


    August 2004

    Microsoft Exchange 2000 Server post-SP3


    March 2008   

    Microsoft Exchange 2000 Server post-SP3


    August 2008




    Microsoft Exchange Server  2003


    October 2003

    Microsoft Exchange Server  2003 SP1


    May 2004

    Microsoft Exchange Server  2003 SP2


    October 2005

    Microsoft Exchange Server  2003 post-SP2


    March 2008

    Microsoft Exchange Server  2003 post-SP2


    August 2008  




    Microsoft Exchange Server  2007

    8.0.685.24 or 8.0.685.25

    December 2006

    Microsoft Exchange Server  2007 SP1


    November 2007

  • Le Café Central de DeVa

    Outlook Programming Series # 13 : Programmatic equivalent for Outlook UI's Send/Receive


    Whenever we work with Outlook 2007 UI, we click either "Send/Receive button" or press "F9" to send and receive emails. In couple of our cases we use to do programmatically you can make use of Outlook Object Model's (OOM) SendAndReceive method. You need to know that calling the SendAndReceive method is synchronous only.

    Syntax: expression.SendAndReceive(showProgressDialog)

    Here, showProgressDialog - Indicates whether the Outlook Send/Receive Progress dialog box should be displayed, regardless of user settings


    • SendAndReceive provides the programmatic equivalent to the Send/Receive All command that is available when you click Tools and then Send/Receive.
    • If you do not need to synchronize all objects, you can use the SyncObjects collection object to select specific objects. For more information, see NameSpace.SyncObjects.
    • All accounts defined in the current profile are used in Send/Receive All.
    • If an online connection is required to perform the Send/Receive All, then the connection is made according to user preferences.

    Using with Outlook Object Model & Visual Basic 6:

    Use NameSpace.SendAndReceive Method. Initiates immediate delivery of all undelivered messages submitted in the current session, and immediate receipt of mail for all accounts in the current profile.

    Using in .Net environment & Outlook interop:

    Use NameSpaceClass.SendAndReceive Method (Microsoft.Office.Interop.Outlook). The types and members of the Microsoft.Office.Interop.Outlook namespace provide support for interoperability between the COM object model of Microsoft Office Outlook 2007 and managed applications that automate Outlook.

    This is a .NET class or a member of a .NET class created when processing a COM coclass that is required by managed code for interoperability with the corresponding COM object. Use this class only when you have to access an earlier event in this class that has been subsequently extended in a later version of Outlook. Otherwise, use the .NET interface derived from the COM coclass.

    Code snippet (used in the add-in):


       1:  public virtual void _NameSpace.SendAndReceive (
       2:      [InAttribute] bool showProgressDialog
       3:  )

    then we need to use the SyncObject,

       1:  //trap the SyncObject.SyncStart Event 
       2:    this.Application.Session.SyncObjects[1].SyncStart += new Microsoft.Office.Interop.Outlook.SyncObjectEvents_SyncStartEventHandler(ThisAddIn_SyncStart);
       4:  //finally don't forget to trap the SyncObject.SyncEnd Event 
       5:  this.Application.Session.SyncObjects[1].SyncEnd += new Microsoft.Office.Interop.Outlook.SyncObjectEvents_SyncEndEventHandler(ThisAddIn_SyncEnd);

    Visual Basic:

       1:  Dim instance As NameSpaceClass
       2:  Dim showProgressDialog As Boolean
       4:  CType(instance, _NameSpace).SendAndReceive(showProgressDialog)



  • Le Café Central de DeVa

    Developer Hub: Download Windows Phone Developer tools SDK 7.1 (Mango) beta & 7.0

      Now you can download the new Windows Phone Developer Tools 7.1 (Mango) Beta can be used to develop Applications for both 7.0 and 7.1 version of Windows Phone OS releases.  You can experiment with the latest tools release for Windows Phone. WPDT 7.1 Beta provides the tooling necessary to target the upcoming Windows Phone OS release (codenamed “Mango”) in addition to productivity enhancements such as an app profiler and an improved emulator.
      Although not required, the Windows Phone Developer Team strongly recommends that you install WPDT 7.1 Beta on a separate machine. Apps built for 7.0 by using the 7.1 beta tools should certify and behave similarly to those produced by your current WPDT environment, but these are beta tools and your apps may behave inconsistently. If you encounter an issue between the beta tools/emulator and production phones, please report the issue on the App Hub 'tools for wp7' forum.
      The Windows Phone Developer Tools includes the following,
      • Microsoft Windows Phone Developer Tools 7.1 (Beta)
      • Windows Phone Emulator (Beta)
      • Silverlight 4 SDK and DRT
      • Microsoft XNA Game Studio 4.0 Refresh Windows Phone Extensions
      • Microsoft Expression Blend SDK Preview for Windows Phone 7.1
      • WCF Data Services Client for Window Phone 7.1
          Please note:
          1) Windows Server, Windows XP & Virtual machine platforms are not supported
          2)  If you are installing Visual Studio 2010 Express for Windows® Phone 7.1 alone, you can install it on any drive. If Visual Studio 2010 Professional or higher is already installed on your development computer, Windows Phone Developer Tools 7.1 Beta is installed on the same drive as the existing Visual Studio installation.
          3) If you just need WP 7.0 SDK, then you can Download the Windows Phone 7.0 SDK (Windows Phone Developer Tools), then download and install the Windows Phone Developer Tools January 2011 Update and the Windows Phone Developer Tools Fix. The January 2011 Update should only be applied after you've installed the Windows Phone Developer Tools.

          French, Italian, German, and Spanish versions of the tools are available at the Microsoft Download Center.

                                                                                                                  blogged using my Windows Live Writer 2011…

        • Le Café Central de DeVa

          Interesting read: Microsoft offerings, OpenSSL & Heartbleed vulnerability


          In recent headlines, the Heartbleed vulnerability in OpenSSL has received a significant amount of attention. While the discovered issue is specific to OpenSSL, many customers are wondering whether this affects Microsoft’s offerings or not. To answer that, I found a similar query posted at Microsoft forum the update – here is the forum post and answer. In addition, you can refer post at Windows Azure blog - http://blogs.msdn.com/b/windowsazure/archive/2014/04/09/information-on-microsoft-azure-and-heartbleed.aspx!!

          Happy reading!!

        Page 4 of 29 (715 items) «23456»