Blog - Title

Brijs Blogging... Looking Beyond the Obvious

  • Brijs Blogging... Looking Beyond the Obvious

    Microsoft Office 2010 RTM is now available for download!!!

    • 2 Comments

    Microsoft Office 2010 RTM is announced @ Office 2010 Reaches RTM! and now available for download by MSDN, Technet subscribers.

    While you won't get it on retail shelves just yet, Microsoft has made available the Office 2010 switch on MSDN and Technet.

    Both 32 and 64-bit downloads are now available to download.

    Office2010

    If you're a subscriber, Go on to your downloads page and grab the final builds!

    Microsoft will officially launch Office 2010 to our business customers on May 12 with Stephen Elop, President of Microsoft’s Business Division, delivering a keynote as part of our virtual launch. Our virtual launch will allow people from around the globe to participate in our launch by going to http://www.the2010event.com. The virtual launch site will showcase product demos, customer and partner testimonials, and interviews with product managers and executives, and we hope this will give you another great way to explore, learn, and get excited about the 2010 releases.

    But if you are not a subscriber, than Office 2010 will first become available in retail stores in June in the US, and customers can pre-order these retail versions of Office 2010 at http://store.microsoft.com/OfficePreorder today to receive Office when it becomes available.

    So, What are you waiting for? Go ahead and enjoy Office 2010!!!

  • Brijs Blogging... Looking Beyond the Obvious

    Microsoft Visual Studio 2010 is available for you!

    • 0 Comments

    As we all are excited with availability of Microsoft Visual Studio 2010 with .Net Framework 4.0 and upcoming releasing of Microsoft Office 2010. I have collated few links to get going with Visual Studio 2010 as below:

    Getting Started with Visual Studio 2010
    http://msdn.microsoft.com/en-us/vstudio/ff431702.aspx

    Better Coding with Visual Studio 2010
    http://msdn.microsoft.com/en-us/magazine/ee336135.aspx

    Visual Studio 2010 and .NET Framework 4 Training Courses
    http://channel9.msdn.com/learn/courses/VS2010/

    Download Visual Studio 2010 today!
    http://www.microsoft.com/visualstudio/en-us/download

    Visual Studio 2010 Express
    http://www.microsoft.com/express/Windows/
    The Visual Studio 2010 Express is a set of free tools which offers you an exciting experience with the new integrated development environment, a new editor built in Windows Presentation Foundation (WPF) and support for the new .NET Framework 4.

    How Do I? Videos for Visual Studio 2010
    http://msdn.microsoft.com/en-us/vstudio/ff459609.aspx

    Keep tuned for more…

  • Brijs Blogging... Looking Beyond the Obvious

    List of all Latest Updates for Microsoft Office, Office Servers, and Related Products

    • 0 Comments

    Update Center for Microsoft Office, Office Servers, and Related Products is a place where you can Find and Manage updates in one place for Office, Forms Server, Groove Server, PerformancePoint Server, Project Portfolio Server, Project Server, Search Server, SharePoint Server, and Windows SharePoint Services. Use the RSS feed on this page and Microsoft Update to automatically receive information about updates and to download the updates themselves.

    Here is the list for the recent released update:

    For the updated list visit @ Update Center for Microsoft Office, Office Servers, and Related Products 

    Hope this helps!!!

  • Brijs Blogging... Looking Beyond the Obvious

    Exchange Server 2007 SP2 Update Rollup3 is available to download

    • 0 Comments

    Exchange Server 2007 SP2 Update Rollup 3 is available to download @ Update Rollup 3 for Exchange Server 2007 Service Pack 2 (KB979784)

    Update Rollup 3 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 3 for Exchange Server 2007 Service Pack 2.

    Important: Before you install an update rollup or a service pack, visit the following Microsoft Web site:

    How to Install the Latest Service Pack or Update Rollup for Exchange 2007

    For more information about prerequisites, installation instructions, and known issues, visit the following Microsoft Web site:

    Applying Exchange 2007 Update Rollups to Clustered Mailbox Servers

    This update rollup does not apply to Exchange Server 2007 release to manufacturing (RTM) version or to Exchange 2007 Service Pack 1 (SP1). The series of update rollup packages for Exchange Server 2007 SP2 is independent of the corresponding series of update rollups for Exchange Server 2007 RTM or Exchange 2007 SP1.
    For a list of update rollups that apply to Exchange Server 2007 RTM or to Exchange Server 2007 SP1, visit the following Microsoft Web site:

    How to Obtain the Latest Service Pack or Update Rollup for Exchange 2007

  • Brijs Blogging... Looking Beyond the Obvious

    How to configure and use EWS Impersonation on Exchange 2010/2007?

    • 0 Comments

    We can refer to the below mentioned articles for configuring and using EWS impersonation for the Exchange 2010:

    And here are the links for configuring and using EWS impersonation for the Exchange 2007:

    Hope this helps!!!

  • Brijs Blogging... Looking Beyond the Obvious

    How to retrieve email address from the “From” and “To” field of mail item using EWS Managed API?

    • 1 Comments

    In case we are calling FindItem for EWS Managed API then, it will provide much of the information that a client application needs. It basically returns a summary of an item. FindItem returns only the first 512 bytes of any streamable property. For Unicode, it returns the first 255 characters by using a null-terminated Unicode string.

    FindItem does not return a message body, attachments, or recipient lists.

    Use GetItemType to get the details of specific items. GetItem returns more properties than FindItem. If more information is required, a client application must perform a FindItem call and then use the item identifiers in a GetItem call to get the properties that are not available in the FindItem call.

    IMP NOTE: Although the Sender property is returned in both FindItem and GetItem calls, only the DisplayName is returned in the FindItem call. DisplayName, EmailAddress, and RoutingType (EmailAddress) are returned by the GetItem call.

    So, here’s sample code snippet to get DisplayName, EmailAddress in C#

    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.

     

    //We are making GetItem call using ManagedAPI here after getting the ItemId from FindItem call
     
    EmailMessage message = EmailMessage.Bind(service, myItem.Id ,
     new PropertySet (BasePropertySet.FirstClassProperties , ItemSchema.Attachments));
    MessageBox.Show( message.From.Name + " " + message.From.Address );
    MessageBox.Show( message.ToRecipients.Count.ToString());
    foreach( EmailAddress eAdd in message.ToRecipients )
    {
            MessageBox.Show(eAdd.Name + " " +eAdd.Address);
    }
     
     
    EWS Managed API Rocks!!!
  • Brijs Blogging... Looking Beyond the Obvious

    How to access an appointment item linked to BCM Contact's communication history using Outlook Object Model programmatically?

    • 1 Comments

    One of my customer is developing application based on Business Contact Manager(BCM) and would like to access an Appointment item linked to BCM contact’s communication history folder using Outlook Object Model(OOM)?

    We can refer to the linked item from the Communication History folder(hidden) of BCM as the linked item are saved as Journal Item in it. See how we can added a file as linked item to the BCM contact or other item @ Files.

    Here is the VBA sample code snippet to get the reference to an an Appointment item linked to BCM contact’s communication history folder using Outlook Object Model(OOM) using Parent Entity EntryID Property

    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.

    Public Sub OutlookExtractMeetingItem()
            Dim ol As Outlook.Application
            Dim olns As Outlook.NameSpace
            Dim bcmRootFolder As Outlook.Folder
            Dim olFolders As Outlook.Folders
            Dim bcmContactsFldr As Outlook.Folder
            Dim allContacts As Outlook.MAPIFolder 'Used for Personal default folder
            Dim allContacts1 As Outlook.Items 'Used for Business Contact folder
            Dim contact As Outlook.ContactItem
            Dim contacts As Outlook.Items
            Dim meetingItem As Outlook.meetingItem
            Dim strParentID As String
            Dim bcmHistoryFolder As Outlook.Folder
            Dim oAppas As Outlook.JournalItem
            Dim oItems As Outlook.Items
            Dim oItem As Object
            
           Set ol = Application
           Set olns = ol.GetNamespace("MAPI")
           Set olFolders = olns.Session.Folders
           Set bcmRootFolder = olFolders("Business Contact Manager")
           'set to the default Contacts in the BCM folder
           Set bcmContactsFldr = bcmRootFolder.Folders("Business Contacts") 
     
            ' Set objAllContacts equal to the collection of all contacts.
            Set allContacts1 = bcmContactsFldr.Items
            allContacts1.Sort ("CompanyName")
            Set bcmHistoryFolder = bcmRootFolder.Folders("Communication History")
            Set oItems = bcmHistoryFolder.Items
    'Loop through all contact and match "Parent Entity EntryID" to Communication History folder items
            For Each contact In allContacts1
                    strParentID = contact.EntryID
                    For Each oItem In oItems
     
                       Set oAppas = oItem
                        If strParentID = oAppas.ItemProperties("Parent Entity EntryID") Then
                            'MsgBox (oAppas.ItemProperties("Parent Entity EntryID").Value)
         'We get reference to the appointment object we can work with appointment object once matched 
                            oAppas.Display
                        End If
                    Next
            Next
    End Sub

    Hope this helps!!!

  • Brijs Blogging... Looking Beyond the Obvious

    How to simplify the process to open Custom Forms in Outlook?

    • 0 Comments

    One of most common question asked by the users of  the Outlook Custom form is How to simplify the process to open Custom Forms in Outlook?

    Below mentioned articles describes various methods that you can use to make a custom Outlook form more accessible to users:

    How to simplify the process to open Organizational Forms in Outlook

    How to Open a Form from a Toolbar Button

    However, there is a know issue when distributing the VBA macro code to other users as per article mentioned below; so creating a small COM/VSTO add-in is way to go.

    Code Does Not Work After You Distribute a VBA Project

    In order to know how to develop an COM/VSTO Outlook add-in refer to KB322145
    Section: Creating a Component Object Model Add-in Solution.

    Hope this helps!!! Have great 2010!!!

  • Brijs Blogging... Looking Beyond the Obvious

    Issue: Getting HTTP 404 error on every request made via Exchange Web Services using EWS HTTP endpoint for Exchange Server 2010

    • 0 Comments

    Few of our customer reported that they are getting HTTP 404 Error reported; when they tries to use EWS HTTP service endpoint for their application for Exchange Server 2010. However, the same application work fine with EWS HTTP service endpoint with Exchange Server 2007 without any issue.

    If we go into Internet Information Services (IIS) on Exchange 2010 RTM and uncheck the box 'Require secure channel (SSL)' on the EWS virtual directory. And then we attempt to make a request using HTTP using EWS service endpoint as “http://host:port/EWS/Exchange.asmx” then we would receive a HTTP 404 Resource Not Found.

    Exchange 2010 Web Services are now based on Windows Communication Foundation (WCF). We receive a HTTP 404 because WCF attempts to locate the endpoint for HTTP but cannot find it and throws a System.ServiceModel.EndpointNotFoundException exception which throws up to the client as a 404 exception.

    Using HTTP instead of HTTPS is not the recommended approach for Exchange Web Services but sometimes it is helpful in debugging/troubleshooting to have this option.

    Here are the steps posted by my colleague Dave @ How to configure a HTTP endpoint for Exchange Web Services in Exchange 2010 to workaround the issue.

  • Brijs Blogging... Looking Beyond the Obvious

    How to delete old items from .pst attached to Outlook using CDO1.21 programmatically?

    • 0 Comments

    If you would like to clear up some old items from the growing PST attached to you Outlook profile; then here is a sample VBA macro code snippet to accomplish the job using CDO 1.21.

    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.

    'We need to add reference to Collaboration Data Objects, version 1.2.1 before running the VBA macro
     
    Sub RemoveAllOldItems()
        Dim ol As Outlook.Application
        Dim olns As Outlook.NameSpace
        Dim colStores As Outlook.Stores
        Dim oStore As Outlook.Store
        Dim oRoot As Outlook.Folder
        Dim ocal As Outlook.Folder
            
        Set ol = Application
        Set olns = ol.GetNamespace("MAPI")
     
        Set colStores = olns.Application.Session.Stores
         For Each oStore In colStores
            Set oRoot = oStore.GetRootFolder
                 
            If oStore.ExchangeStoreType = 3 Then 'And oRoot = "Test" Then
                DeleteOldItems oRoot
                EnumerateFolders oRoot
            End If
         Next
       
    End Sub
     
    Public Function EnumerateFolders(ByVal objFld As Outlook.Folder)
        Dim folders As Outlook.folders
        Dim Folder As Outlook.Folder
        Dim foldercount As Integer
        
        Set folders = objFld.folders
        foldercount = folders.Count
        'Check if there are any folders below oFolder
        If foldercount Then
            For Each Folder In folders
                Debug.Print (Folder.FolderPath)
                DeleteOldItems Folder
                EnumerateFolders Folder
            Next
        End If
    End Function
        
    Public Function DeleteOldItems(ByVal objfl As Outlook.Folder)
        Dim oItems As Outlook.items
        Dim i As Long
     
        Set oItems = objfl.items
        Dim oRT As Date
        For i = oItems.Count To 1 Step -1
            oRT = oItems.Item(i).ReceivedTime
            'Checking for 4 months old items 
            If DateDiff("m", oRT, Now()) >= 4 Then
                Debug.Print "Old item found"
                'Uncomment the below line to delete this item
                'oItems.Item(i).Delete
            End If
        Next
    End Function

     

    If you are running Outlook 2007 then you need to download and install CDO 1.21 @ Collaboration Data Objects, version 1.2.1

    Hope this helps! Happy Holidays :)

  • 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!

  • Brijs Blogging... Looking Beyond the Obvious

    How to deploy VSTO add-ins for Outlook?

    • 2 Comments

    “What is the best way to deploy VSTO add-ins for Outlook?” This is one of the most common question asked by our customers who are developing add-ins using Visual Studio Tools for Office(VSTO) for Outlook and other Office Applications.  Simple answer is that it’s all depend on you requirements and environment. We can opt for either ClickOnce Deployment or Windows Installer.

    We can refer to Choosing a Deployment Strategy and the following table compares the features of ClickOnce deployment with Windows Installer deployment to make informed decision:

    Features

    ClickOnce

    Windows Installer

    Automatic update1

    Yes

    Yes

    Post-installation rollback2

    Yes

    No

    Update from Web

    Yes

    No

    Does not affect shared components or other applications

    Yes

    No

    Security permissions granted

    Grants only permissions necessary for the application (more safe)

    Grants Full Trust by default (less safe)

    Security permissions required

    Internet or Intranet Zone (Full Trust for CD-ROM installation)

    Administrator

    Application and deployment manifest signing

    Yes

    No

    Installation-time user interface

    Single prompt

    Multipart Wizard

    Installation of assemblies on demand

    Yes

    No

    Installation of shared files

    No

    Yes

    Installation of drivers

    No

    Yes (with custom actions)

    Installation to Global Assembly Cache

    No

    Yes

    Installation for multiple users

    No

    Yes

    Add application to Start menu

    Yes

    Yes

    Add application to Startup group

    No

    Yes

    Add application to Favorites menu

    No

    Yes

    Register file types

    Yes

    Yes

    Install time registry access3

    Limited

    Yes

    Binary file patching

    No

    Yes

    Application installation location

    ClickOnce application cache

    Program Files folder

    Articles to refer

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Notes:

    1. With Windows Installer, you must implement programmatic updates in the application code.

    2. With ClickOnce, rollback is available in Add or Remove Programs.

    3. ClickOnce deployment can access HKEY_LOCAL_MACHINE (HKLM) only with Full Trust permission.

    Feel free to put questions related to ClickOnce or Windows Installer deployment for Office Add-ins to me.

  • Brijs Blogging... Looking Beyond the Obvious

    Exchange Web Services and Exchange 2010 - What’s new Webcasts

    • 0 Comments

    Exchange 2010 is on it way and along with it Exchange Web Services Managed API would be one-in-all interface for developing custom applications.

    So, If you are developing Exchange related application and interested to know what you can do with the new EWS Managed API and what’s new in Exchange 2010 for developers then, Here are few interesting web casts to learn more: 

    10/13/2009 - Exchange Server 2010 Development (Part 1 of 6): Migrating Applications to Exchange Web Services

    10/14/2009 - Exchange Server 2010 Development (Part 2 of 6): A Deep Dive into Using Autodiscover Service in Exchange Web Services

    10/15/2009 - Exchange Server 2010 Development (Part 3 of 6): A Deep Dive into Impersonation and Delegation in Exchange Web Services

    10/20/2009 - Exchange Server 2010 Development (Part 4 of 6): A Deep Dive into Exchange Web Services Notifications (Push/Pull)

    10/21/2009 - Exchange Server 2010 Development (Part 5 of 6): A Deep Dive into the Exchange Web Services Managed API

    10/22/2009 - Exchange Server 2010 Development (Part 6 of 6): Best Practices for Building Scalable Exchange Server Applications

    If you can’t wait for it, then have a sneak peek from quick video with Jason Henderson and David Claux of the EWS team @ Chris Mayo’s post.

    Enjoy!!!

  • Brijs Blogging... Looking Beyond the Obvious

    How to create a Service Account with full access to all mailboxes on Exchange Server 2007 mailboxstore?

    • 0 Comments

    We can use following Exchange PowerShell cmdlet to grant a Service Account full access to all the mailboxes on Exchange Server 2007 mailboxstore, but do so only in accordance with your organization's security and privacy policies:

    Get-mailboxserver <servername> | add-adpermission –user <service account> -accessrights GenericRead, 
    GenericWrite -extendedrights Send-As, Receive-As, ms-Exch-Store-Admin

    We need to modify <servername> as the Exchange Server name and <service account> as the account for which we would like to grant access.

    If you have further questions related to Exchange 2007 Permissions then please refer to
    Exchange 2007 Permissions: Frequently Asked Questions

    And if you writing a custom application using EWS or Exchange Web Services Managed API for Exchange 2007 then you can also have look at nice post @ Exchange Impersonation vs Delegate Access. which explain difference between Exchange Impersonation and  Delegate Access to access an Exchange mailbox using Exchange Web Services.

  • Brijs Blogging... Looking Beyond the Obvious

    Exchange 2007 Webcasts for Client Access and Web Services

    • 0 Comments

    Want to learn more about Microsoft Exchange Server 2007 then Support WebCasts  are way to go. Support Webcasts are a free Internet broadcast service that is provided by Microsoft. You can view webcasts on-demand, and you can also download them in Microsoft Windows Media format for offline viewing.

    Here are few worthy of note webcasts which I found for the Exchange developers:

    Join us for a look at the various underlying components of Exchange Server 2007 Client Access Services. We cover the enhanced calendar functionality, the new Unified Messaging and Exchange Server Web services, and programmatic access to messaging data. We conclude the session by examining Exchange Server ActiveSync improvements.

    TechNet Webcast : Exchange Server 2007 Client Access and Web Services (Level 200)

    Learn about the Exchange 2007 implementation of the Autodiscover service. You can use this service to automatically configure Microsoft Office Outlook 2007 with connection settings so that it can easily connect to the Exchange 2007 server. The Support WebCast includes information about server and certificate configuration in various environments to achieve optimal functionality. Discover more yourself, and watch Support WebCast : Introduction to Autodiscover in Microsoft Exchange Server 2007.

    Support WebCast : Introduction to Autodiscover in Microsoft Exchange Server 2007.

    If you want to explore more, and get you on your way quickly, here are some webcasts that you might be interested in:

    Happy Learning…

  • Brijs Blogging... Looking Beyond the Obvious

    How to search for SMTP Servers in a domain programmatically using ADSI?

    • 0 Comments

    Here is a sample vbscript using which we can get SMTP servers instance names in a particular domain pragmatically via ADSI.

    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.

    Option Explicit
    Dim conn
    Dim com
    Dim iAdRootDSE
    Dim strNC
    Dim strQry
    Dim RS
    Dim strstmsrv
    Dim svsSmtpserver
    Dim crServerName
     
    set conn = createobject("ADODB.Connection")
    set com = createobject("ADODB.Command")
    Set iAdRootDSE = GetObject("LDAP://RootDSE")
     
    strNC = iAdRootDSE.Get("configurationNamingContext")
     
    conn.Provider = "ADsDSOObject"
    conn.Open "ADs Provider"
    com.ActiveConnection = Conn
    com.ActiveConnection = Conn
     
    Wscript.echo
    Wscript.echo "SMTP Virtual Servers"
     
    'Get SMTP server query using protocolCfgSMTPServer object class
    strQry = "<LDAP://" & strNC & ">;(objectCategory=protocolCfgSMTPServer);name,distinguishedName;subtree"
     
    com.ActiveConnection = conn
    com.CommandText = strQry
     
    Set RS = com.Execute
     
    While Not RS.EOF
        strstmsrv = "LDAP://" & rs.fields("distinguishedName")
        set svsSmtpserver = getobject(strstmsrv)
        crServerName = mid(svsSmtpserver.distinguishedName,instr(svsSmtpserver.distinguishedName,"CN=Protocols,")+16,instr(svsSmtpserver.distinguishedName,",CN=Servers")-(instr(svsSmtpserver.distinguishedName,"CN=Protocols,")+16))
        wscript.echo
        wscript.echo "ServerName:" & crServerName
        
        RS.movenext
    wend
     
    Set RS=Nothing
    Set com=Nothing
    Set conn=Nothing

     

    Here is another good example of where protocolCfgSMTPServer object class is used to find SMTP Virtual Server and set Message Restriction on an SMTP Virtual Server Using ADSI in VB @ Setting Message Restriction on an SMTP Virtual Server Using ADSI.

    Hope this helps.

  • Brijs Blogging... Looking Beyond the Obvious

    Download Available for Exchange Server 2007 Service Pack 2

    • 0 Comments

    You can now download Exchange Server 2007 Service Pack 2 from here Exchange Server 2007 SP2

    We can refer to the following links to know more about SP2 in details:

    Things which would be of interest for Exchange application developers are: 

  • Named Properties cmdlets - SP2 enables Exchange administrators to monitor their named property usage per database.
  • New User Interface for Managing Diagnostic Logging- SP2 enables Exchange administrators to easily configure and manage diagnostic logging from within the Exchange Management Console.

    Exchange Server 2007 Service Pack 2 (SP2), the Manage Diagnostic Logging Properties wizard is added to the Exchange Management Console. In Exchange Server 2007 Service Pack 1 or an earlier version, you must use the Exchange Management Shell to change diagnostic logging levels. for further reading Diagnostic Logging of Exchange Processes

  • Brijs Blogging... Looking Beyond the Obvious

    Unable to open Outlook item attached using Attachments.Add and using the olByReference flag on the Outlook 2007

    • 0 Comments

    One of our customer is sending Outlook item attached using Attachments.Add with olByReference Flag on Outlook 2007. If the recipient of the email tries to open the attached item

    will get “Microsoft Office Oulook could not complete the operation. One or more parameters values are not valid” exception.

    OlAttachErr

    To repro the issue we can use following sample VBA code snippet:

    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.

    Sub SendCurrentItemAsAttach()
        Set currItem = Application.ActiveInspector.CurrentItem
        currItem.Save
        Set RequestItem = Application.CreateItem(0)
        RequestItem.Subject = "Please check attached mail"
        RequestItem.HTMLBody = "Please check attached mail" & Chr(13) 
        RequestItem.To = "test@domain.com" 
        Set myAttachments = RequestItem.Attachments
        myAttachments.Add currItem, 4 'olByReference(4)
        RequestItem.Send
        Set RequestItem = Nothing
    End Sub

    The above issue is happening because of the design changes in the Outlook 2007.

    One workaround to address the above issue is to include a hyperlink in the email using the Outlook:\\<ENTRYID> protocol to link to the existing item rather than attaching the item ByRef. So to avoid above issue we can use following VBA sample code snippet:

    Sub SendCurrentItemAsAttach()
        Set currItem = Application.ActiveInspector.CurrentItem
        currItem.Save
        Set RequestItem = Application.CreateItem(0)
        RequestItem.Subject = "Please check attached mail"
        RequestItem.HTMLBody = "Please click to open the requestl" & Chr(13) & "<a href=Outlook:\\" & currItem.EntryID & ">Click Mail</a>"
        RequestItem.To = "test@domain.com"
        RequestItem.Send
        Set RequestItem = Nothing
    End Sub

    IMP: using Outlook:EntryID approach but it would works ONLY in case of HTML/RTF mail.

    References:

  • Brijs Blogging... Looking Beyond the Obvious

    FYI: Outlook 2003 and Exchange Server 2003 goes into Extended Support

    • 1 Comments

    Outlook 2003 and Exchange Server 2003 goes into extended Support from 4/14/2009

    What is the difference between Mainstream Support, Extended Support, and online self-help support?

    Support provided

    Mainstream Support phase

    Extended Support phase

    Paid support (per-incident, per hour, and others)

    X

    X

    Security update support

    X

    X

    Non-security hotfix support

    X

    Requires extended hotfix agreement, purchased within 90 days of mainstream support ending.

    No-charge incident support

    X

       NA

    Warranty claims

    X

    NA

    Design changes and feature requests

    X

    NA

    Product-specific information that is available by using the online Microsoft Knowledge Base

    X

    X

    Product-specific information that is available by using the Support site at Microsoft Help and Support to find answers to technical questions

    X

    X

    IMP: Microsoft will NOT accept requests for warranty support, design changes, or new features during the Extended Support phase.

    To understand Support Lifecycle policy we can refer to Microsoft Support Lifecycle Policy FAQ

    To find the support timelines for other Microsoft products, visit the Select a Product for Lifecycle Information site (products listed by Product Family) or the Support Lifecycle Index site.

  • Brijs Blogging... Looking Beyond the Obvious

    Remove all PST from the Outlook Mailbox using VBScript

    • 1 Comments

    If you would like to remove all of the Personal Folders file .PSTs attached to the Outlook Mailbox profile then we can use RemoveStore Method.

    Here is a sample VBScript to perform the job for us:

    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.

    'Sample script to remove Personal Folders files (.pst) from the current MAPI profile or session
    RemoveAllPST
     
    Sub RemoveAllPST()
    Dim objOL 'As New Outlook.Application
    Dim objFolders 'As Outlook.MAPIFolders
    Dim objFolder 'As Outlook.MAPIFolder
    Dim i 'As Interger
    Dim strPrompt 'As String
     
    Set objOL = CreateObject("Outlook.Application")
    Set objFolders = objOL.Session.Folders
    For i = objFolders.Count To 1 Step -1
    On Error Resume Next
        Set objFolder = objFolders.Item(i)
         
        'Prompt the user for confirmation
        If (InStr(1, objFolder.Name, "Mailbox") = 0) And (InStr(1, objFolder.Name, "Public Folders") = 0) Then
        
        strPrompt = ""
        strPrompt = "Are you sure you want to remove " & objFolder.Name
       
        If MsgBox(strPrompt, vbYesNo + vbQuestion) = vbYes Then
            objOL.Session.RemoveStore objFolder
        End If
        End If
    Next
     
    End Sub

    We can also refer to the article mentioned below related to RemoveStore Method:

    NameSpace.RemoveStore Method
    http://msdn.microsoft.com/en-us/library/bb219923.aspx

    Hope this helps.

  • Page 2 of 4 (78 items) 1234