Le Café Central de

                 ... Deva blogs!!

  • Le Café Central de DeVa

    Outlook 2007 : Why i can’t accept an invitation that is in a third-party calendar format?


    One of my customer updated that they have an application which uses Outlook Object Model which usually receives the invitation and process it. But when has issues for a specific invitation to a meeting in Microsoft Outlook 2007. This impacts him that he can’t no longer accept the invitation. When we researched regarding the issue, we found it’s not with respect to the code. We found that the invitation is generated and present in a third-party calendar format (ical).

    This issue is fixed in the Outlook 2007 post-Service Pack 1 Hotfix Package that was released on January 28, 2008.

  • Le Café Central de DeVa

    Outlook Object Model : Why i can’t able to assign value for MAPIFolder.WebViewURL ?


    One of my customer had created an Outlook Add-in using VSTO & Outlook Object Model (OOM). As per the business logic, he need to implement the WebViewURL in it. The MAPIFolder.WebViewURL works fine and take’s us to set value to it most of the times, but it doesn’t function as expected in some time; the strange thing is it’s not throwing any error or exception when we execute the code.

    //[Code Snippet : C# , VSTO, Outlook Object Model (OOM)]
    //Provide the non-default store path
    String pstPath = @"providelocalpath like c:\personals.pst";
    MAPIFolder _pstFolder;
    //Add the PST
    this.Application.Session.AddStoreEx(pstPath, OlStoreType.olStoreDefault);
    _pstFolder = this.Application.Session.Folders[2];
    //Provide PSTFolder Name
    _pstFolder.Name = "SampleFolder";
    //Set the values
    MAPIFolder mf = _pstFolder.Folders.Add("MyHtmlView", Type.Missing);
    //Assign value for MAPIFolder.WebViewURL
    mf.WebViewURL = "http://www.microsoft.com";
    mf.WebViewOn = true;

    MAPIFolder.WebViewURL Property (Microsoft.Office.Interop.Outlook) Returns or sets a String (string in C#) indicating the URL of the Web page that is assigned to a folder. Read/write.

    When we start troubleshooting the case, we found that the issue happens for the non-default stores.

    During research we found couple of community blog post references, Randy & Ryan’s MS Press book that with respect to Microsoft Office Outlook 2007, the home page setting is disabled for non-default stores. Non-default stores can include Personal Folders files (.pst) or the Microsoft Windows SharePoint Services folders. These folders are also stored in a .pst file. To see the home page setting for a non-default store, right-click the store in the Navigation Pane, click Properties, and then click the Home Page tab.

    By default, you cannot type or paste a URL in the Address box. This issue occurs because, by default, home pages are disabled for non-default stores. To overcome this issue, we don’t have any programmatic resolution; but we can implement the resolution by refer the following support KB.

  • Le Café Central de DeVa

    Part # 1 : Exchange Web Services (EWS) & VB.Net – Creating Calendar (non-Recurrence type)


    Hi Peers,

    I have include the part 1 of Exchange Web Services & VB.Net. Earlier my couple of VB developer customers were looking for relevant VB.Net related articles and found very few. Keeping in that mind, i have created this EWS_VB.net_Calendar thread to start with.

    In this session we will going to see how we can create the Calendar using Exchange Web Services (EWS). I tried to provide things as simpler as i can…

    I would appreciate to know if you have any suggestions/clarifications regarding this…


    Step 1: Create Exchange Service Binding

    'Create Exchange Service Binding
    Dim esb As New ExchangeServiceBinding()
    'Provide the NetworkCredential
    esb.Credentials = New NetworkCredential("username", "password", "domain")
    'Provide the URL
    esb.Url = https://Fully qualified domain/ews/exchange.asmx

    Step 2: Create Calendar

    ' Create the appointment.
    Dim appointment As New CalendarItemType()

    Step 3: Set the properties of the appointment

    ' Set the properties of the appointment.
    appointment.Start = "2/24/2009 12:30:00PM"
    appointment.StartSpecified = True
    appointment.[End] = "2/24/2009 1:30:00PM"
    appointment.EndSpecified = True
    appointment.Subject = "Planning meeting by Deva"
    appointment.Location = "Building 3, Room 311"
    appointment.Body = New BodyType()
    appointment.Body.BodyType1 = BodyTypeType.Text
    appointment.Body.Value = "Plan the department party."

    Step 4: Add the required attendees

    ' Add required attendees.
    appointment.RequiredAttendees = New AttendeeType(1) {}
    appointment.RequiredAttendees(0) = New AttendeeType()
    appointment.RequiredAttendees(0).Mailbox = New EmailAddressType()
    appointment.RequiredAttendees(0).Mailbox.EmailAddress = "chris@contoso.com"

    Step 5: Create the array of items that will contain the appointment

    ' Create the array of items that will contain the appointment.
    Dim arrayOfItems As New NonEmptyArrayOfAllItemsType()
    arrayOfItems.Items = New ItemType(1) {}
    ' Add the appointment to the array of items.
    arrayOfItems.Items(0) = appointment
    ' Create the CreateItem request.
    Dim createRequest As New CreateItemType()
    'The SendMeetingInvitations attribute is required for calendar items.
    createRequest.SendMeetingInvitations = CalendarItemCreateOrDeleteOperationType.SendToAllAndSaveCopy
    createRequest.SendMeetingInvitationsSpecified = True
    'Add the destination folder(calendar) to the CreateItem request.
    createRequest.SavedItemFolderId = New TargetFolderIdType()
    Dim dfCalendarFolder As DistinguishedFolderIdType = New DistinguishedFolderIdType()
    dfCalendarFolder.Id = DistinguishedFolderIdNameType.calendar
    createRequest.SavedItemFolderId.Item = dfCalendarFolder

    Step 6: Add the items to CreateItem request

    ' Add the items to the CreateItem request.
    createRequest.Items = arrayOfItems

    Step 7: Create the appointment by calling the CreateItem method & Check the result

    ' Create the appointment by calling the CreateItem method, which has the side effect of sending invitations to attendees.
    Dim createResponse As CreateItemResponseType = esb.CreateItem(createRequest)
    ' Check the result.
    If createResponse.ResponseMessages.Items(0).ResponseClass <> ResponseClassType.Success Then
         Throw New Exception("SendAppointment failed.")
                Console.WriteLine("Calendar Item Created")
    End If

    Step 8: Result


  • Le Café Central de DeVa

    Gotcha - PermanentURL & WebDAV Series # 2 - How to access flat URLs using CDO/MAPI


    With continuation to previous blog post, this article describes how to access items in a WebDAV application that are identified by using MAPI. The WebDAV application uses flat URLs to access items or folders.

    How to use flat URLs to access items by using MAPI ?

    1. Read property tag 0x670E001E by using MAPI on the folder or item to access.

    2. Save the returned value in a variable. The value will resemble the following:


    3. Construct a URL that is used to access the folder or item that is using the flat URL. The URL will resemble the following:


    4. Use the URL in a WebDAV call to access an item.

    Best use of Flat URL usage in the Programming

    Flat URLs do not have encoding and escaping rules and will work for folders and items in most DAV operations, with the following exceptions:

    • As destinations of MOVE or COPY operation
    • As a source for a DELETE
    • For Outlook Web Access URL commands; for example, ?cmd=[myCommand].

    Use this property when you are stepping out of CDO 1.2.1 or MAPI code into WebDAV. The HREF in WebDAV is usually created from the subject that was typed in Microsoft Outlook. The subject in Outlook can contain characters that are encoded for use with DAV. This encoding resembles URL encoding. Instead of reverse engineering the encoding, use the flat URL to get the item.

    Hope this helps.

  • Le Café Central de DeVa

    Unsupported Messaging API’s in Managed code – Outlook Add-ins


    Certain technologies that predate the .NET Framework are not supported in managed code programming. These technologies include Collaboration Data Objects (CDO), Messaging Application Programming Interface (MAPI, often known as Extended MAPI), and Simple MAPI. These technologies were designed and developed with unmanaged code, and Microsoft does not provide official managed wrappers to support their use in managed applications. For more information, see the section "API's that are supported in managed code" in the article KB 266353: The support guidelines for client-side messaging development.

    If you want to know why the MAPI and CDO 1.21 is not supported in the managed .Net application, please refer Matt Stehle’s blogpost available: http://blogs.msdn.com/mstehle/archive/2007/10/03/fyi-why-are-mapi-and-cdo-1-21-not-supported-in-managed-net-code.aspx.

    Nonetheless, Microsoft Office Outlook 2007 has offered many object model features that achieve what previously only CDO and Exchange Client Extensions (ECE) solved for developers. If you use CDO in an existing unmanaged Outlook application and the lack of support for CDO in managed solutions has hindered you from migrating the application to managed code, you can now consider updating your solution to managed code, using only the Outlook object model and the Primary Interop Assembly (PIA) for Outlook 2007, without having to resort to CDO.

  • Le Café Central de DeVa

    Outlook 2007 SP2’s application shutdown changes


    I went through Ryan’s MSDN article, where we can learn how Microsoft Office Outlook 2007 Service Pack 2 has changed the way that the Outlook process shuts down. Customers developing Outlook solutions that run outside of the Outlook process should understand these changes and the impact on their solutions.

    Prior to Outlook 2007 SP2, Outlook followed the best practices for Component Object Model (COM) servers and allowed clients of the Outlook COM server to control the shutdown of the Outlook process. This caused a significant end-user side effect: often the end user could not close Outlook because of lingering external references from Outlook.

    As a result of customer feedback about the need to close Outlook and have Outlook stop running, Outlook 2007 SP 2 changes the way Outlook closes, ensuring that the intent of the end user─to close Outlook─is respected. These changes significantly affect the way that the Outlook COM server shuts down, which can impact solutions using the Outlook object model outside of the Outlook process.

    Impact for Add-ins

    If your solution is an in-process COM add-in, or if you used Microsoft Visual Studio Tools for Office to write an add-in for Outlook, this change does not affect the way that Outlook and your add-in work together. The lifetime of in-process add-ins and in-process COM references to Outlook objects in Outlook 2007 is the same as the lifetime of the Outlook process. When the user closes the last Outlook window and Outlook starts to close, Outlook disconnects add-ins and releases all of their references to Outlook.

    Add-ins can use the Quit event on the Application object to determine when Outlook closes down. After Outlook raises the Quit event, the OnDisconnection method of the IDTExtensibility2 interface of the add-in or the Shutdown method of the ThisAddin class of the Visual Studio Tools for Office add-in will be called, the add-in will be unloaded, and Outlook will close.

    Impact for Solutions

    In versions of Outlook earlier than Outlook 2007 SP2, before Outlook closed, Outlook would check for external, out-of-process references on its COM server and wait for those references to be released. This allowed out-of-process solutions that depended on Outlook data to keep Outlook running until the references were released. This is a common behavior for COM servers; however, this is unexpected behavior for end users, who expect that an application will close when they close the last window of the application.

    By default, Outlook 2007 SP2 ignores external COM references when determining if it should close. When an end user closes the last Outlook window on the user's computer, Outlook starts closing down the process: first raising the Quit event on the Application object, then disconnecting add-ins and external references, followed by flushing internal caches to disk, and finally exiting its process.

    Because of the way COM works, when Outlook releases external references, these referenced objects become disconnected objects in cross-process solutions. Without being aware that previously referenced objects have been disconnected by Outlook, a solution that attempts to use any of these object references will receive an error, RPC_E_DISCONNECTED. Solutions that are not designed to handle this error may stop responding or respond unexpectedly. This occurs when a solution attempts to use an object reference to Outlook after Outlook has closed and disconnected all previous references to the object.

    To work properly with the new behavior in Outlook, a solution should listen for the Quit event on the Application object. When that event is raised, the solution should stop any work in progress that uses Outlook data, and release all references to Outlook. Any remaining references after the solution returns from the Quit event will be disconnected. The solution should no longer use any of these disconnected references since any operation will result in an error. If the solution subsequently needs to access data from Outlook, it can request a new instance of the Application object by using the CoCreateInstance function, which will start Outlook without any user interface as described below. However, this should be avoided because the end user has closed Outlook.

    Note: The solution should be aware of the Windows shut-down events, and should not attempt to invoke a new instance of Outlook if Outlook is shutting down because Windows is shutting down.

    While a solution is handling the Quit event, Outlook can appear to have stopped responding to the end user and the operating system. The end user may forcibly terminate Outlook instead of waiting for it to finish closing. Therefore, the solution should handle and return from the Quit event as quickly as possible.

    As a result of this change, solutions may work differently on Outlook 2007 SP2. Solutions providers may need to update their solutions so that they work properly with the new behavior in Outlook 2007 SP2.

  • Le Café Central de DeVa

    Why Windows Vista based client prompts to enter your credentials when you access an FQDN site?


    One of my customer reported that whenever he tries to use Web Distributed Authoring and Versioning (WebDav) to access a fully qualified domain names (FQDN) site. But he is prompted to enter the credentials, even though the user account that we are using has sufficient permission to access this site. During the research we found that he tries to access from a Windows Vista-based computer, where he do not configure a proxy in Windows Internet Explorer and he gets this issue/prompt.

    It’s because, in Windows Vista, Internet Explorer uses the Web Client service when you use Internet Explorer to access a WebDAV resource. The Web Client Service uses Windows HTTP Services (WinHTTP) to perform the network I/O to the remote host. WinHTTP sends user credentials only in response to requests that occur on a local intranet site. However, WinHTTP does not check the security zone settings in Internet Explorer to determine whether a Web site is in a zone that lets credentials be sent automatically.

    If no proxy is configured, WinHTTP sends credentials only to local intranet sites.

    Note If the URL contains no period in the server’s name, such as in the following example, the server is assumed to be on a local intranet site: http://sharepoint/davshare

    If the URL contains periods, the server is assumed to be on the Internet. The periods indicate that you use an FQDN address. Therefore, no credentials are automatically sent to this server unless a proxy is configured and unless this server is indicated for proxy bypass.

    Note A server can be indicated for proxy bypass either through the bypass list or through the proxy configuration script.

    In this case, you are prompted to enter your credentials when the Web site asks for credentials. Even in this case, the security zone settings are ignored.

    Hotfix available: To overcome this issue, a supported hotfix is available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hot fix only to systems that are experiencing this specific problem.

    Important This hotfix is included in Windows Vista Service Pack 1 or a later service pack. However, you must still configure the AuthForwardServerList registry entry. For more information, see the Registry information section.

  • Le Café Central de DeVa

    How to assign service account access to all mailboxes in Exchange Server 2003?


    Per the support KB which talks about how to grant permissions to all mailboxes. Granting access to all mailboxes can be useful when you are completing tasks such as offline recovery. As per the support KB, it’s recommended that not to use this procedure in a production environment to allow unauthorized access to user data. Doing so might violate your corporate privacy and security policies. Implement an auditing plan on your network to detect and to record improper use of network administrative credentials by system administrators.

    In Microsoft Exchange Server 5.5, when you grant Service Account Admin access rights on the Site container to a Microsoft Windows-based account, you grant that account unrestricted access to all mailboxes. In Microsoft Exchange 2000 Server and Exchange Server 2003, there is no service account, and even accounts with Enterprise Administrators rights are denied rights to gain access to all mailboxes.

    In Microsoft Windows 2000 Server and Microsoft Windows Server 2003, services typically run under the account of the computer where they are installed. This account is the local system account (LocalSystem), and its password is created and recycled by Windows 2000 or Windows Server 2003. By default, you can use this service account to gain access to the Exchange mailbox, the public folder stores, and other Windows resources for performing mail transfer and directory synchronization.

    If your logon account is the Administrator account or is a member of the Domain Admins or Enterprise Admins groups, then you are explicitly denied access to all mailboxes other than your own, even if you otherwise have full administrative rights over the Exchange system. All Exchange Server 2003 administrative tasks can be performed without having to grant an administrator sufficient rights to read other people's mail.

    You can override this default restriction in several ways, but do so only in accordance with your organization's security and privacy policies. Frequently, overriding the default restriction is appropriate only in a recovery server environment.

    How to grant the admin account access through ESM?

    To grant your administrative account access through Exchange System Manager to all mailboxes in a single database regardless of inherited denials:

    1. Start Exchange System Manager, and then locate the database you want to have full mailbox access to.
    2. Open the properties of this object, and then click the Security tab.
    3. Grant your account full explicit permissions on the object, including Receive As permissions.

    After you have made this change, you may still see unavailable Deny and Allow permissions assigned to your account. The unavailable permissions indicate that by inheritance you have been denied permission, but that you have inherited permissions at this level. In the Windows permissions model, explicitly granted permissions override inherited permissions.

    Note that an explicit Allow at a lower level permission overrides an explicit Deny from a higher level permission only on the single object where the override is set, not on that object's child objects. This prevents you from granting yourself permissions on a server to gain access to each database; you must grant permissions on databases individually.

    After you change permissions, you may have to log off and log back on. Microsoft also recommends that you stop and restart all Exchange services. If you have multiple domain controllers in the forest, you may also have to wait for directory replication to complete

  • Le Café Central de DeVa

    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
                Dim objsel As Object
               'Check it's Inspector or Explorer Window
                If TypeName(ThisOutlookSession.ActiveWindow) = "Inspector" Then
                    objsel = ThisOutlookSession.ActiveInspector.CurrentItem
                   'Get the selected item for processing
                    objsel = ThisOutlookSession.ActiveExplorer.Selection.Item(1)
                   'Check the relevant item and process per your logic
                    If (TypeOf objsel Is Outlook.MailItem) Then
                        Dim mailItem As Outlook.MailItem = _
                            TryCast(objsel, Outlook.MailItem)
                        MsgBox("Mail Item's Subject" & mailItem.Subject)
                        'Implement your business logic here
                    ElseIf (TypeOf objsel Is Outlook.ContactItem) Then
                        Dim contactItem As Outlook.ContactItem = _
                           TryCast(objsel, Outlook.ContactItem)
                        MsgBox("Contact Item's Subject" & contactItem.Subject)
                        'Implement your business logic here
                    ElseIf (TypeOf objsel Is Outlook. _
                    AppointmentItem) Then
                        Dim apptItem As Outlook.AppointmentItem = _
                           TryCast(objsel, Outlook.AppointmentItem)
                        MsgBox("Appointment Item's Subject" & apptItem.Subject)
                        'Implement your business logic here
                    ElseIf (TypeOf objsel Is Outlook.TaskItem) Then
                        Dim taskItem As Outlook.TaskItem = _
                            TryCast(objsel, Outlook.TaskItem)
                        MsgBox("Task Item's Body" & taskItem.Body)
                        'Implement your business logic here
                    ElseIf (TypeOf objsel Is Outlook.MeetingItem) Then
                        Dim meetingItem As Outlook.MeetingItem = _
                            TryCast(objsel, Outlook.MeetingItem)
                        MsgBox("Meeting Item's subject" & meetingItem.Subject)
                        'Implement your business logic here
                    End If
                End If
                'Release the unwanted objects
                objsel = Nothing

    Applicable environment: Outlook 2007, Outlook Object Model, VB.Net, .Net Framework 2.0/3.5

  • Le Café Central de DeVa

    CDONTS, CDOSYS, System.Web.Mail & System.Net.Mail


    Microsoft Windows Server 2003 does not install Collaboration Data Objects (CDO) for NTS (CDONTS). Therefore, applications that use CDONTS do not function on a Windows Server 2003-based computer.

    Windows Server 2003 provides improved alternatives to CDONTS. To make applications that use CDONTS function on a Windows Server 2003-based computer, update existing CDONTS applications to use one of the following technologies:

    • CDO for Windows 2000
      CDO for Windows 2000 provides a broader functionality set than CDONTS. This functionality includes the ability to send messages through a remote Simple Mail Transfer Protocol (SMTP) server. You can use CDO for Windows 2000 (CDOSYS) in applications that are not Microsoft .NET Framework-based.

      For example, Microsoft Visual Basic 6.0 and Microsoft ASP are not based in the .NET Framework. You can also use CDOSYS in .NET Framework applications.
    • System.Web.Mail
      The System.Web.Mail namespace provides a managed wrapper for CDOSYS. The System.Web.Mail namespace is only available in .NET Framework applications.
    • System.Net.Mail
      When we talk about .Net framework, we can use the System.Net.Mail namespace. It provides way to send electronic mail to a Simple Mail Transfer Protocol (SMTP) server for delivery.

    FYI: System.Net.Mail Vs System.Web.Mail

    In .NET 1.1, only the System.Web.Mail was available. This implementation needs to be done in quite different way. For example, attachment could only be added from files, not from Streams. So, this can be still used under .Net Framework 1.0 and 1.1, but going forward it’s “deprecated” or “Obsolete”; so it’s recommended that to make use of System.Net.Mail.

    The .NET 2.0 implementation is System.Net.Mail and is much more flexible and has a richer feature set.

  • Le Café Central de DeVa

    Outlook 2007 MAPI reference : Required properties for all the messages


    Please find the following table which described in the Outlook 2007 MAPI reference talks about properties that clients can expect to set or see supported on messages of all classes.



    PR_CREATION_TIME PidTagCreationTime Canonical Property (PidTagCreationTime)

    Set by message store providers on outgoing messages.

    PR_DISPLAY_BCC (PidTagDisplayBcc)

    PR_DISPLAY_CC (PidTagDisplayCc)

    PR_DISPLAY_TO (PidTagDisplayTo)

    Set by message store providers on outgoing messages.


    PR_ENTRYID (PidTagEntryId)

    Set by message store providers on outgoing messages.

    PR_LAST_MODIFICATION_TIME (PidTagLastModificationTime)

    Set by message store providers on outgoing messages.

    PR_MESSAGE_ATTACHMENTS (PidTagMessageAttachments)

    Set by message store providers on outgoing messages.

    PR_MESSAGE_CLASS (PidTagMessageClass)

    Can be set by clients on outgoing messages; must be set by message store providers if not set by clients.

    PR_MESSAGE_FLAGS (PidTagMessageFlags)

    Set by clients on outgoing messages before they are saved and message store providers after they are saved.

    PR_MESSAGE_RECIPIENTS (PidTagMessageRecipients)

    Set by message store providers on outgoing messages.

    PR_MESSAGE_SIZE (PidTagMessageSize)

    Set by message store providers on outgoing messages.

    PR_MESSAGE_CC_ME (PidTagMessageCcMe)

    PR_MESSAGE_RECIP_ME (PidTagMessageRecipientMe)

    PR_MESSAGE_TO_ME (PidTagMessageToMe)

    Set by transport providers on incoming messages.


    PR_NORMALIZED_SUBJECT (PidTagNormalizedSubject)

    Set by message store providers on outgoing messages

    PR_ORIGINATOR_AND_DL_EXPANSION_HISTORY (PidTagOriginatorAndDistributionListExpansionHistory)

    PR_ORIGINATOR_CERTIFICATE (PidTagOriginatorCertificate)

    PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED (PidTagOriginatorDeliveryReportRequested)

    PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED (PidTagOriginatorNonDeliveryReportRequested)

    PR_ORIGINATOR_REQUESTED_ALTERNATE_RECIPIENT (PidTagOriginatorRequestedAlternateRecipient)

    PR_ORIGINATOR_RETURN_ADDRESS (PidTagOriginatorReturnAddress)

    Set by transport providers on outgoing messages.

    PR_PARENT_ENTRYID (PidTagParentEntryId)

    PR_PARENT_DISPLAY (PidTagParentDisplay)

    Set by message store providers on outgoing messages.


    PR_RCVD_REPRESENTING_ADDRTYPE (PidTagReceivedRepresentingAddressType)

    PR_RCVD_REPRESENTING_EMAIL_ADDRESS (PidTagReceivedRepresentingEmailAddress)

    PR_RCVD_REPRESENTING_ENTRYID (PidTagReceivedRepresentingEntryId)

    PR_RCVD_REPRESENTING_NAME (PidTagReceivedRepresentingName)

    PR_RCVD_REPRESENTING_SEARCH_KEY (PidTagReceivedRepresentingSearchKey)

    Set by transport providers on incoming messages.

    PR_RECEIVED_BY_ADDRTYPE (PidTagReceivedByAddressType)

    PR_RECEIVED_BY_EMAIL_ADDRESS (PidTagReceivedByEmailAddress)

    PR_RECEIVED_BY_ENTRYID (PidTagReceivedByEntryId)

    PR_RECEIVED_BY_NAME (PidTagReceivedByName)

    PR_RECEIVED_BY_SEARCH_KEY (PidTagReceivedBySearchKey)

    Set by transport providers on incoming messages.

    PR_RECIPIENT_TYPE (PidTagRecipientType)

    Set by message store providers on incoming messages.

    PR_RECORD_KEY (PidTagRecordKey)

    Set by message store providers on outgoing messages.

    PR_SEARCH_KEY (PidTagSearchKey)

    Set by message store providers on outgoing messages.

    PR_SENDER_ADDRTYPE (PidTagSenderAddressType)

    PR_SENDER_EMAIL_ADDRESS (PidTagSenderEmailAddress)

    PR_SENDER_ENTRYID (PidTagSenderEntryId)

    PR_SENDER_NAME (PidTagSenderName)

    PR_SENDER_SEARCH_KEY (PidTagSenderSearchKey)

    Clients can set these properties on outgoing messages, but transport providers must set them.

    PR_SENT_REPRESENTING_ADDRTYPE (PidTagSentRepresentingAddressType)

    PR_SENT_REPRESENTING_EMAIL_ADDRESS (PidTagSentRepresentingEmailAddress)

    PR_SENT_REPRESENTING_ENTRYID (PidTagSentRepresentingEntryId)

    PR_SENT_REPRESENTING_NAME (PidTagSentRepresentingName)

    PR_SENT_REPRESENTING_SEARCH_KEY (PidTagSentRepresentingSearchKey)

    Clients can set these properties on outgoing messages, but transport providers must set them.

    PR_STORE_ENTRYID (PidTagStoreEntryId)

    PR_STORE_RECORD_KEY (PidTagStoreRecordKey)

    Set by message store providers on outgoing messages.

  • Le Café Central de DeVa

    How to use offline booking of resources in Outlook?


    Do you know how to use offline booking of resources in Outlook?

    Microsoft Office Outlook 2007, Microsoft Office Outlook 2003, Microsoft Outlook 2002, and Microsoft Outlook 2000 allow you to schedule a resource, such as a conference room or piece of equipment, without the Microsoft Exchange Server account that is assigned to this resource being online to accept the booking. I found this article which outlines the procedures that are associated with this feature.

    Note: The procedures in this article only apply if you have installed Outlook with the Corporate or Workgroup option. With this option, you can use Messaging Application Programming Interface (MAPI) services. To determine your installation type, click About Microsoft Outlook, on the Help menu. If you have the Corporate or Workgroup installation, you see "Corporate or Workgroup"

  • Le Café Central de DeVa

    Part # 3 : Working with SCL (Spam Confidence Level) - Manually adding the SCL rating field into the column header of Outlook folders

    Per the support knowledgebase, we need to add the SCL rating field, follow these steps:
    1. In Outlook 2003, click Inbox.
    2. On the View menu, click Arrange By, and then click Custom.
    3. In the Customize View: Messages dialog box, click Fields.
    4. In the Show Fields dialog box, click the Select available fields from list, and then click Forms.
    5. In the Select Enterprise forms for this folder dialog box, click Personal Forms on the list.
    6. Locate SCL Extension From in the left pane, and then click Add to add it to the right pane. Click Close.
    7. In the Show Fields dialog box, locate the SCL in the left pane, and then click Add to add it to the right pane.
    8. Click OK two times.
    9. In the Inbox, you will see a new column that is named SCL in the column header. All the messages in the Inbox show their SCL rating values under the SCL column.


    • You can also use this procedure in folders that are separate from the Inbox to check the SCL rating values for the messages in these folders.
    • After you install the SCL extension Form, you still will not see the messages' SCL rating values right away.
    • You have to add the SCL rating field to the column header.
    • When you do this, you can automatically check the messages' SCL rating values that are listed in the SCL column in Outlook 2003.
  • Le Café Central de DeVa

    Part # 2 : Working with SCL (Spam Confidence Level) programmatically


    In this series, we will concentrate on how we can get the IMF SCL rating programmatically with Outlook 2003/2007 by calling the getSCL() method:

    '[Outlook VBA : Code snippet]
    Sub getSCL()
    Set inbox = Outlook.ActiveExplorer.CurrentFolder 
    Set items = inbox.items
    'Implement Unstructured Exception handle 
    On Error Resume Next 'should it encounter an error, it will proceed to the next item. 
    For Each item In items 
    If item.Class = olMail Then 
    Set mail = item 
     'creates a user property called “SCL Rating” and adds the property to the folder
    Set sclProp = mail.UserProperties.Add("SCL Rating", olText, True)
     'schema value for PR_CONTENT_FILTER_SCL
    strSCL = mail.PropertyAccessor.GetProperty("http://schemas.microsoft.com/mapi/proptag/0x40760003") 
    sclProp.Value = strSCL 
    'saves the prop to the mail item
    End If 
    Set sclProp = Nothing 
    End Sub 
  • Le Café Central de DeVa

    Part # 1 : Working with SCL (Spam Confidence Level)


    What is the SCL?

    The spam confidence level (SCL) is the normalized value assigned to a message that indicates, based on the characteristics of a message (such as the content, message header, and so forth), the likelihood that the message is spam.

    What are the SCL values?

    There are eleven values available to categorize spam, as outlined in the following table.

    SCL Value

    Spam Categorization


    Reserved by Microsoft® Exchange Server 2003 for messages submitted internally. A value of -1 should not be overwritten because it is this value that is used to eliminate false positives for internally-submitted e-mail.


    Assigned to messages that are not spam.




    Extremely low likelihood that the message is spam.

    ...ranging to...

    Extremely high likelihood that the message is spam.

    This array allows you to choose how aggressive or conservative you want your spam filtering to be by selecting a threshold value above which you consider a message to be spam. If you want to aggressively filter spam, you can choose a fairly low threshold, such as an SCL value of 5, which would catch a higher number of spam messages. However, a higher number of false positives would also be caught. To filter spam more conservatively, you can choose a higher threshold, such as an SCL value of 8, which would catch fewer spam messages, with a lower number of false positives being caught.

    How this values are getting assigned to messages?

    Spam filtering algorithms assign spam ratings, scores, or probabilities to messages. This value is referred to as the algorithm's raw score. The raw scores are then normalized to a set of standard SCL values and assigned to a message by the spam filtering algorithm. Raw scores are normalized to a set of standard SCL values for the following reasons:

    ·         Configuration settings for the handling of spam are based on the SCL value. Actions performed on messages will typically be determined by thresholds, for example, "move all messages with an SCL value greater than x to the Junk E-mail folder."

    ·         As algorithms evolve, the raw scores they produce may change in meaning. Normalizing the raw scores ensures that the user experience stays relatively constant throughout the evolution of an algorithm.

    ·         Developers will create different spam filtering algorithms that will distinctly assign raw scores. Normalizing these varying raw scores will present a standard value to the end user.

    How it’s mapped?

    • Because different filters will have unique methods of rating messages, the precise mapping of a raw score to an SCL value will vary. The following are general guidelines for mapping raw scores to SCL values:

    ·         Binary results. If an algorithm produces a binary result where the message is determined to be either not spam or spam, a rating of 0 should be used for not spam and a rating of 9 for spam.

    ·         Distribution. If an algorithm produces a distribution of raw scores, a rating of 0 should be assigned to messages determined to not be spam. The remaining raw scores should be mapped in the range of 1 to 9, determined by the probability that the message is spam.

    How can I configure Exchange 2003 to block unsolicited commercial e-mail (spam) with Intelligent Message Filter?

    Microsoft Exchange Intelligent Message Filter helps companies reduce the amount of unsolicited commercial e-mail (UCE), or spam, received by users. The Intelligent Message Filter is based on Microsoft SmartScreen Technology from Microsoft Research. By using e-mail characteristics tracked by SmartScreen technology, Intelligent Message Filter can help determine whether each incoming e-mail message is likely to be spam. Based on this likelihood, you can choose to block e-mail messages at the gateway or at the mailbox store.

    How we can expose the SCL value in Outlook?

    There is a wonderful article from James Webster which discusses regarding this.

  • Le Café Central de DeVa

    OOM & VSTO : How to capture the current item from the active inspector?


    One of my customer (developer) updated and created an Outlook 2007 Add-in (VSTO). He want to capture the current item from the active inspector?

    In order to capture the current item from the active inspector you can use “OutlookSession.ActiveInspector.CurrentItem”. It will like this,

    '[VB.Net: Code Snippet]
    'Declaration part
    Dim ThisOutlookSession As Outlook.Application = New Outlook.Application
    Dim NS As Outlook.NameSpace = ThisOutlookSession.Session
    'Implement your business logic, if you have any
    'Find whether the active window is the Inspector or not
    If TypeName(ThisOutlookSession.ActiveWindow) = "Inspector" Then 
    End if
  • Le Café Central de DeVa

    OOM : How to get SMTP address using OOM?


    Earlier we(programmers) use CDO or MAPI to retrieve the real SMTP address (like user@domain.com) of Exchange account. But with the new object model, retrieving the SMTP address of Exchange account is much easier; it’s as simple like the following steps: 

    • Get the ExchangeUser object by using the GetExchangeUser method
    • From the ExchangeUser, retrieve the PrimarySmtpAddress property.

    FYI, i have enclosed some of the relevant properties and objects, which can helps us to do more…

    • AddressEntryUserType:
      Returns the type of address entry. You can use this property to distinguish between Exchange address and non-Exchange address. For Exchange addresses, use GetExchangeUser and GetExchangeDistributionList methods for getting more address details.
    • PropertyAccessor:
      Returns a PropertyAccessor object that allows you to access other properties.
    • GetExchangeDistributionList Method:
      Returns ExchangeDistributionList object that provides more information about Exchange Distribution List.
    • GetExchangeUser Method:
      Returns ExchangeUser object that provides more information about Exchange address entry.
    • GetContact Method:
      Returns a Contact object for this address entry

      Hope this helps!!

  • Le Café Central de DeVa

    Unicode mails send using CDOSYS &amp; Bodypart show special or funny characters in message body


    Recently I was working with a Customer who uses ASP & CDOSYS to send Unicode content e-mails. He had the following partial code-snippet:

    Set objMail = Server.CreateObject("CDO.Message") 'Create CDO.Message Object
    Set objBodyPart = objmail.BodyPart 'Create BodyPart
    objBodyPart.Charset = "UTF-8" 'Set relevant Charset
    Set objConf = Server.CreateObject("CDO.Configuration") 'Create Configuration Object
    Set objFields = objConf.Fields 'and set its Configuration fields
    With objFields 
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2 'Send using port or pickup
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "localhost" 'Specify SMTPServer
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 20 'Specify timeout
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 'Specify the port
    .Update 'Update the Configuration
    End With 
    With objMail 
    Set .Configuration = objConf 'Set the configuration object
    .From = email 'Set From users
    .To = Trim(recip) 'Set recipients
    .Subject = subject 'Set the subject
    .TextBody = txString 'txtString contains the unicode chars
    End With 
    objMail.Send 'Send
    'Release the objects
    Set objFields = Nothing 
    Set objConf = Nothing 
    Set objMail = Nothing 

    But he updated that he can display the information correctly in a web browser using UTF-8 encoding on the web page; But whenever he send the information
    via email the Unicode values in the message body show the "special or funny" characters.He also tried setting the charset for the email but it doesn't made any difference.

    When we started troubleshooting we found that we need to set the HTMLBodyPart and TextBodyPart Charset in the above code, which resolved the issue.

  • Le Café Central de DeVa

    Relationship between CDOSYS &amp; CDOEX


    CDOEX is a superset of CDOSYS; this means that CDOEX contains all of the functionality of CDOSYS, plus additional functionality for use with Microsoft Exchange Server 2000. When CDOEX is installed on a computer, it takes over the functionality that was previously provided by CDOSYS. Any program that makes calls to CDOSYS will now call CDOEX instead.

    When CDOEX is installed (by installing Microsoft Exchange Server 2000, Microsoft Office XP, or other programs), the CDO for Windows 2000 reference is removed from the list of possible references available to Visual Basic applications. However, the CDO for Exchange 2000 library is available, and developers can use CDOEX just as they would have used CDOSYS.

    This relationship can affect the development of Visual Basic projects, including programs developed with Microsoft Visual Basic for Applications (VBA) or Visual Basic Scripting Edition (VBScript) in the following way:

    • Programs created using CDOSYS will function without change on computers with CDOEX installed.
    • Applications created using CDOEX and using only the objects associated with CDOSYS (CDO.Message for instance), will also function as expected on computers with only CDOSYS installed.
    • The full CDOEX object model is designed for use on computers with Microsoft Exchange 2000 Server installed. Code developed for CDOEX using CDOEX-specific objects will NOT execute correctly on computers without Exchange 2000 Server installed.

    Note CDOSYS and CDOEX are not direct replacements for CDO 1.21 (CDO.DLL); their presence has no effect on the CDO 1.21 library.

    For more information about CDO libraries, click the following article numbers to view the articles in the Microsoft Knowledge Base:

    Relationship between 1.x CDO Libraries and CDOSYS.DLL

    Where to acquire the CDO Libraries (all versions)

  • Le Café Central de DeVa

    Office 2007 Language Interface Packs and spell-checkers for Armenian, Georgian, Telugu, Konkani, Punjabi, Kannada, and Oriya


    In a recent post, the Language Log was discussing localization of software in under-resourced languages like Yoruba. Mark Liberman noted that, via its « Unlimited Potential Program », Microsoft had probably done more for linguistic diversity than any other software publisher (and perhaps more than the free software community) by providing localized versions of its software in dozens of languages. Meanwhile, the Microsoft Local Language Program has now made available a whole series of new Language Interface Packs for Office 2007. These LIPs enable users to work with user interfaces in their own languages while benefiting from spell-checkers (some of these languages had no speller in earlier versions of Office). They can be downloaded freely from the links you will access if you click on the names of the languages below (five of these languages are spoken in India):

    · Armenian (or հայերեն լեզու, if you want to write it in Armenian ; 7 million speakers, including 3 million in Armenia)

    · Georgian (4.1 million native speakers; the official language of the Republic of Georgia; anecdotally, consonant clusters are common in Georgian: some words contain up to 8 consecutive consonants, like გვბრდღვნი (gvbrdgvni), you tear us; nouns have 8 cases and verbal morphology is very complex)

    · Telugu (or తెలుగు ; one of the four classical languages in India and one of the 22 official languages in this country ; it is the official language of the state of Andhra Pradesh and is also spoken in Tamil Nadu, Karnataka, Orissa, and Pondicherry)

    · Konkani (or कोंकणी; 7,6 million speakers ; one of the official languages of the Republic of India, mainly spoken in the Indian state of Goa; the LIP includes a brand-new speller)

    · Kannada (or ಕನ್ನಡ; it is one of the major Dravidian languages of India and the official and administrative language in the Indian state of Karnataka, in the South of India; about 35 million speakers)

    · Punjabi (or ਪੰਜਾਬੀ ; Indo-Aryan language spoken in the Punjab region, which is now split between India and Pakistan ; it has 90 million native speakers, which makes it the 11th most widely spoken language in the world).

    · Oriya (or ଓଡ଼ିଆ; one of the official languages of India, mainly spoken in the Indian state of Orissa; about 30 million native speakers; the LIP includes a brand-new spell-checker for that language)

Page 1 of 1 (20 items)