Blog - Title

November, 2009

Brijs Blogging... Looking Beyond the Obvious

  • Brijs Blogging... Looking Beyond the Obvious

    Microsoft Office 2010 beta is available to download

    • 0 Comments

    I am very excited to share that Microsoft announced the public beta release of Office 2010, SharePoint Server 2010, Visio 2010, Project 2010, Office Web Apps for business customers, and Office Mobile 2010.

    If you are developing application based on Outlook; then here are few links related to developing applications for Outlook 2010:

    If you are looking for resources to learn more about Office 2010. Then the Office 2010 Developer Workshop includes videos and presentations @ Office 2010 Workshop. This content is designed to help you get started developing solutions, from Add-ins to full featured Office Business Applications (OBAs), using Visual Studio 2010 with Office 2010 and SharePoint 2010 as the core platform.

    So, what are you waiting for? hit the road with Office 2010 Developer Roadmap.

    And to complement it we can download Microsoft Visual Studio 2010 Professional Beta and refer to

    Visual Studio 2010 - What's New in Office Development as well.

    Enjoy Learning!!!

  • Brijs Blogging... Looking Beyond the Obvious

    Exchange Server 2007 SP2 Update Rollup1 is available to download

    • 0 Comments

    Exchange Server 2007 SP2 Update Rollup 1 is available to download @ Download the Exchange2007-KB971534-EN package now.

    Update Rollup 1 for Exchange Server 2007 Service Pack 2 (SP2) resolves issues that were found in Exchange Server 2007 SP2 since the software was released. This update rollup is highly recommended for all Exchange Server 2007 SP2 customers. For the details related to the issue fixed by it refer to Description of Update Rollup 1 for Exchange Server 2007 Service Pack 2.

     

    If you are developing application based on Exchange Web Services then following are the issues fixed by Update Rollup 1 for Exchange Server 2007 Service Pack 2 (SP2):

    • 973868 A delegate cannot cancel meetings in the organizer's calendar by using Exchange Web Service (EWS)
    • 973307 An application that uses Exchange Web Services returns an exception on an Exchange Server 2007 server
    • 972009 E-mail messages cannot be retrieved by an Exchange Web Service (EWS)-based application if there are invalid control characters in the text body of the e-mail message

    So, if you are on Exchange Server 2007 SP2; I would highly recommend you to download and install Update Rollup 1 to fix the know issued with Exchange Server 2007 SP2.

  • Brijs Blogging... Looking Beyond the Obvious

    Exchange Web Services Managed API and EWS Editor is available!

    • 0 Comments

    If you are developing using Exchange Web Services Managed API then now you can download @ Microsoft Exchange Web Services (EWS) Managed API 1.0

    The Microsoft Exchange Web Services (EWS) Managed API 1.0 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.

    Moreover, If you are looking for sample application developed using Exchange Web Service Managed API then EWS Editor is a great resource to have. Read more details about EWSEditor and download it from Matt’s post @ Announcing EWSEditor 1.5! Here are the few points which I really liked about it:

    1. Demonstrate the Exchange Web Services Managed API functionality and simplicity to developers through its source code.
    2. Demonstrate the Exchange Web Services SOAP traffic used to perform actions initiated through an explorer user interface.
    3. Assist non-developers in debugging and understanding Exchange stores by exploring items, folders, and their properties in depth. “

    EWS rocks!

  • Brijs Blogging... Looking Beyond the Obvious

    Issue accessing Public Folder Store using CDO 1.2.1 for Outlook 2007

    • 0 Comments

    If you are using InfoStores collection of CDO 1.2.1 for Outlook 2007 to access Public Folder store and not able to get reference to Public Folder store then here is the explanation of the design change in CDO 1.2.1 from SGriffin’s post@Outlook 2007, Public Folders, MAPI and You.

    Basically, Outlook 2007's version of the Exchange provider, emsmdb32, doesn't automatically add the Public Folder store to the message store table of a new profile. Instead, it waits until a successful connection has been made to the Exchange server. If it then detects that the public folders are available, it updates the profile and sends a table notification indicating the availability of Public Folders. This is a change from previous versions of Outlook and from Exchange's version of the provider. We made this change to better support Exchange 2007's Public Folder-less environments.

    Here is the vbscript sample code snippet to repro the issue:

    NOTE: Following programming examples is for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This sample code assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. This sample code is provided for the purpose of illustration only and is not intended to be used in a production environment.

    'Change Server and User name below
    SERVER = "Server"
    Mailbox = "User"
     
    Set objSession = CreateObject("MAPI.Session")
    objSession.LogOn , "", False, True, , True, SERVER  & Chr(10) & Mailbox
     
        Set objInfoStores = objSession.InfoStores
         For i = 1 To objInfoStores.Count
            If UCase(objInfoStores.Item(i)) = UCase("Public Folders") Then
                Set objInfoStore = objInfoStores.Item(i)
                    msgbox objInfoStore.name 
                Exit For
            End If
        Next
     
    Set objInfoStores= Nothing
    Set objSession=Nothing
     
    The above sample code would not return the name of the Public Folders store to us.
     
    We need to work around the above issue by creating another session object as per the below code snippet:
     
    'Change Server and User name below
    SERVER = "Server"
    Mailbox = "User"
     
    Set objSession = CreateObject("MAPI.Session")
    objSession.LogOn , "", False, True, , True, SERVER  & Chr(10) & Mailbox
     
        Set objInfoStores = objSession.InfoStores
         For i = 1 To objInfoStores.Count
            If UCase(objInfoStores.Item(i)) = UCase("Public Folders") Then
                Set objInfoStore = objInfoStores.Item(i)
                    msgbox objInfoStore.name 
                Exit For
            End If
        Next
     
     
    Set objSession2 = CreateObject("MAPI.Session")
    objSession2.LogOn , "", False, False, , True, SERVER  & Chr(10) & Mailbox
     
        Set objInfoStores2 = objSession2.InfoStores
         For i = 1 To objInfoStores2.Count
            If UCase(objInfoStores2.Item(i)) = UCase("Public Folders") Then
                Set objInfoStore2 = objInfoStores2.Item(i)
                    msgbox objInfoStore2.name 
                Exit For
            End If
        Next
     
    Set objInfoStores= Nothing
    Set objSession=Nothing
     
    Set objInfoStores2= Nothing
    Set objSession2=Nothing

     

    Note: We are using third parameter as “False” for objSession2.Logon, So that it uses the current shared MAPI session.

  • Brijs Blogging... Looking Beyond the Obvious

    How to do FindItem using Extended MAPI Properties in a Exchange Web Service call?

    • 1 Comments

    We can perform GetItem Exchange Web Service call to get Extended MAPI Properties refer my previous post How to get Extended MAPI Properties in the GetItem Exchange Web Service call? and can also perform FindItem based on the Extended MAPI Properties.

    In the sample code given below we would use CleanGlobalObjectId to perform FindItem for Calendar Items:

    NOTE: Following programming examples is for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This sample code assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures.

     

        private void SelectRecordByCGOID()
            {
                
                //prepare the find item request: we have to use FindItem because
                //this is the only way to search by CleanGlobalObjectID; GetItem does not allow us
                //to search with Restrictions
                FindItemType findItemRequest = new FindItemType();
                DistinguishedFolderIdType[] folderIDArray = new DistinguishedFolderIdType[1];
                folderIDArray[0] = new DistinguishedFolderIdType();
                folderIDArray[0].Id = DistinguishedFolderIdNameType.calendar;
                folderIDArray[0].Mailbox = new EmailAddressType();
                folderIDArray[0].Mailbox.EmailAddress = "brijs@msglab.com";
              
                // Add folders to the request.
                findItemRequest.ParentFolderIds = folderIDArray;
                findItemRequest.Traversal = ItemQueryTraversalType.Shallow;
     
                //Prepare an Item shape type that defines how the items in view will be returned.
                ItemResponseShapeType itemShapeDefinition = new ItemResponseShapeType();
                itemShapeDefinition.BaseShape = DefaultShapeNamesType.AllProperties  ;
     
                
                //filter the results by the CleanGlobalObjectID passed in
                PathToExtendedFieldType path = new PathToExtendedFieldType();
                
                path.PropertyId = 35;
                path.PropertyIdSpecified = true;
                path.PropertySetId = "6ED8DA90-450B-101B-98DA-00AA003F1305";
                path.PropertyType = MapiPropertyTypeType.Binary;
                     
     
                FieldURIOrConstantType constant = new FieldURIOrConstantType();
                ConstantValueType constantValue = new ConstantValueType();
                constantValue.Value = itemGCOID ;
                constant.Item = constantValue;
     
                RestrictionType restriction = new RestrictionType();
                IsEqualToType equal = new IsEqualToType();
                equal.Item = path;
                equal.FieldURIOrConstant = constant;
                restriction.Item = equal;
     
                //Add the itemShape definition and restriction to the FindItem request
                findItemRequest.ItemShape = itemShapeDefinition;
                findItemRequest.Restriction = restriction;
                
                FindItemResponseType findItemResponse = binding.FindItem(findItemRequest);
     
                for (int i = 0; i < findItemResponse.ResponseMessages.Items.Length; i++)
                {
                    //verify the FindItem request was successfull
                    if (findItemResponse.ResponseMessages.Items[i].ResponseClass != ResponseClassType.Success)
                    {
                        throw new Exception(string.Format(
                            "Unable to find calendar view by CleanGlobalObjectID \r\n{0}\r\n{1}",
                            findItemResponse.ResponseMessages.Items[i].ResponseCode,
                            findItemResponse.ResponseMessages.Items[i].MessageText));
                    }
                    else
                    {
                            //Success
                            //get the calendar items contained in the response
                            FindItemResponseMessageType findItemResponseMessage = (FindItemResponseMessageType)findItemResponse.ResponseMessages.Items[i];
                            ArrayOfRealItemsType findItemResponseItems = (ArrayOfRealItemsType)findItemResponseMessage.RootFolder.Item;
     
                            for (int x = 0; x < findItemResponseMessage.RootFolder.TotalItemsInView; x++)
                            {
                                if (findItemResponseItems.Items[x] is CalendarItemType)
                                {
                                    CalendarItemType calendar = (CalendarItemType)findItemResponseItems.Items[x];
                                    Console.WriteLine( "Item found ");
                                    Console.WriteLine( calendar.Subject);
                                }
                            }
                     }
                }
                                        
            }

    Hope this helps!

  • Brijs Blogging... Looking Beyond the Obvious

    How to get Extended MAPI Properties in the GetItem Exchange Web Service call?

    • 1 Comments

    We can get/set Extended MAPI Properties using Exchange Web Services for Exchange Server 2007/2010.

    Here is sample code snippet to get value for CleanGlobalObjectID via GetItem call of Exchange Web Services:

    NOTE: Following programming examples is for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This sample code assumes that you are familiar with the programming language being demonstrated and the tools used
    to create and debug procedures.

    private void fnGetCalItem()
            {
                // Form the GetItem request
                GetItemType getRequest = new GetItemType();
     
                // Define which item properties are returned in the response
                ItemResponseShapeType itemProperties = new ItemResponseShapeType();
                itemProperties.BaseShape = DefaultShapeNamesType.AllProperties;
     
                // Add properties shape to request
                getRequest.ItemShape = itemProperties;
     
                // Set the itemID of the desired item to retrieve
                ItemIdType id = new ItemIdType();
                id.Id = itemID;
                getRequest.ItemIds = new ItemIdType[] { id };
     
     
                PathToExtendedFieldType[] pteft = new PathToExtendedFieldType[1];
     
                pteft[0] = new PathToExtendedFieldType();
                
                //Add CleanGlobalObjectID extended property 
                pteft[0].PropertyId = 35;
                pteft[0].PropertyIdSpecified = true;
                pteft[0].PropertySetId  = "6ED8DA90-450B-101B-98DA-00AA003F1305" ; 
                pteft[0].PropertyType = MapiPropertyTypeType.Binary;
                itemProperties.AdditionalProperties = pteft;
     
                // Send the listing (find) request and get the response
                GetItemResponseType getResp = binding.GetItem(getRequest);
     
                // Get the response message
                if (getResp.ResponseMessages.Items[0].ResponseClass == ResponseClassType.Success)
                {
                    ItemInfoResponseMessageType iirmt = getResp.ResponseMessages.Items[0] as ItemInfoResponseMessageType;
                    itemGCOID = iirmt.Items.Items[0].ExtendedProperty[0].Item.ToString() ;
                 }
                else
                {
                    Console.WriteLine(getResp.ResponseMessages.Items[0]);
                }
            }

     

    Articles referenced for the above sample code:

    Hope this helps!

Page 1 of 1 (6 items)