Le Café Central de
Deva             


                    ... Deva blogs!!



  • Le Café Central de DeVa

    EWS : How to access user’s free/busy info programmatically using Exchange Web Services (EWS)?

    • 0 Comments

    In this post, we will see how to access user free/busy information programmatically using Exchange Web Services (EWS) – Proxy. Exchange provides such a service by storing what is referred to as free/busy data. This information will indicate what requested time range is free, busy, and tentative for a particular user. It will also provide any out of office (oof) status as well. Free/Busy data can be obtained using the Availability service provided by the Exchange Server. This is simply a web service which obtains the free/busy data directly from a user’s calendar.

    Specifically, the GetUserAvailability operation will provide the free/busy state at specific level of detail.Using GetUserAvailability operation, which provides current user availability information at a specified level of detail - about the availability of a set of users, rooms, and resources within a specified time period. Client applications such as Microsoft Office Outlook, Microsoft Outlook Web Access, Microsoft Outlook Mobile Access, and other applications use SMTP addresses to identify the requested user information.

    Let start now by creating the binding, set the credentials/URL and pass the binding (esb) to the following functionality ( which I haven’t added here).


    Identify the time to compare free/busy information:

    Duration duration = new Duration();

    duration.StartTime = DateTime.Now;

    duration.EndTime = DateTime.Now.AddHours(4);


    Identify the options for comparing free/busy information:

    FreeBusyViewOptionsType fbViews = new FreeBusyViewOptionsType();

    fbViews.TimeWindow = duration;

    fbViews.RequestedView = FreeBusyViewType.MergedOnly;

    fbViews.RequestedViewSpecified = true;

    fbViews.MergedFreeBusyIntervalInMinutes = 35;

    fbViews.MergedFreeBusyIntervalInMinutesSpecified = true;


    Identify the user mailbox to review for free/busy data:
    MailboxData[] mbx=
    newMailboxData[1];

    mbx[0] = new MailboxData();

    EmailAddress emailAddress = new EmailAddress();

    emailAddress.Address = "user1@domain.com";

    emailAddress.Name = String.Empty;

    mbx[0].Email = emailAddress;

    mbx[0].ExcludeConflicts = false;

    Make the request and set the time zone of the request:
    getusrRequest.TimeZone = newSerializableTimeZone();

    getusrRequest.TimeZone.Bias = 480;

    getusrRequest.TimeZone.StandardTime = newSerializableTimeZoneTime();

    getusrRequest.TimeZone.StandardTime.Bias = 0;

    getusrRequest.TimeZone.StandardTime.DayOfWeek = DayOfWeekType.Sunday.ToString();

    getusrRequest.TimeZone.StandardTime.DayOrder = 1;

    getusrRequest.TimeZone.StandardTime.Month = 11;

    getusrRequest.TimeZone.StandardTime.Time = "02:00:00";

    getusrRequest.TimeZone.DaylightTime = new SerializableTimeZoneTime();

    getusrRequest.TimeZone.DaylightTime.Bias = -60;

    getusrRequest.TimeZone.DaylightTime.DayOfWeek = DayOfWeekType.Sunday.ToString();

    getusrRequest.TimeZone.DaylightTime.DayOrder = 2;

    getusrRequest.TimeZone.DaylightTime.Month = 3;

    getusrRequest.TimeZone.DaylightTime.Time = "02:00:00";


    In addition to that, add the mailbox and the view options to the request
    getusrRequest.MailboxDataArray = mbx;

    getusrRequest.FreeBusyViewOptions = fbViews;


    Send the above request and get the response:
    GetUserAvailabilityResponseType getusrResponse = esb.GetUserAvailability(getusrRequest);


    Access the free/busy info:

    if(getusrResponse.FreeBusyResponseArray.Length < 1)

    {

    Console.WriteLine("No free/busy response data available.");

    }

    else

    {

    foreach(FreeBusyResponseType fbrt in getusrResponse.FreeBusyResponseArray)

    {

    if(fbrt.ResponseMessage.ResponseClass == ResponseClassType.Error)

    {

    Console.WriteLine("Error:" + fbrt.ResponseMessage.MessageText);

    }

    else

    {

    FreeBusyView fbv = fbrt.FreeBusyView;

    Console.WriteLine("Merged free/busy data: " + fbv.MergedFreeBusy);

    }

    }

    }


    If you run the above piece of code, then you will get the result:

    clip_image001[17]

    For more information, you can refer the following article: http://msdn.microsoft.com/en-us/library/aa564001(v=exchg.140).aspx

    Happy programming!!

  • Le Café Central de DeVa

    Download: EWS Managed API 1.1

    • 0 Comments

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

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

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

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

  • Le Café Central de DeVa

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

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

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

                                                                                                                  blogged using my Windows Live Writer 2011…

        • Le Café Central de DeVa

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

          • 1 Comments

          Please find the following code snippet for retrieving various Outlook attachments  - Reference, Value, Embedded and OLE using Outlook Object Model (OOM) & VBA:

          'Code Snippet : How to retrieve Outlook attachments using Visual Basic for Application (VBA)
          Dim omailitem As Outlook.MailItem
          Dim oattach As Outlook.Attachment
          Dim ofolder As Outlook.Folder
           
          Set ofolder = Application.Session.PickFolder
          Debug.Print "Total Items available in Folder : " & ofolder.Items.Count
           
          For Each Item In ofolder.Items
          Set omailitem = Item
          Debug.Print "Item Subject :" & omailitem.Subject & " Size (in bytes):" & omailitem.Size
          If omailitem.Attachments.Count > 0 Then
           
          For Each oattach In omailitem.Attachments
          If oattach.Type = Outlook.olByReference Then
          Debug.Print "By reference : " & oattach.FileName & " Size (in bytes) : " & oattach.Size
          ElseIf oattach.Type = Outlook.olByValue Then
          Debug.Print "By Value : " & oattach.FileName & " Size (in bytes) : " & oattach.Size
          ElseIf oattach.Type = Outlook.olEmbeddeditem Then
          Debug.Print "Embedded item : " & oattach.FileName & " Size (in bytes) : " & oattach.Size
          ElseIf oattach.Type = Outlook.olOLE Then
          Debug.Print "OLE : " & oattach.FileName & " Size (in bytes) :" & oattach.Size
          End If
          Debug.Print "-------------------"
          Next
          End If
          Next

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

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

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

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

        • Le Café Central de DeVa

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

          • 0 Comments

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

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

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

          You can try this out…

        • Le Café Central de DeVa

          Part # 4 - Configure Public folder permissions

          • 1 Comments

          Configure Public folder permissions

          Please find the lists of management tasks that you can perform to configure and maintain public folder permissions:

          • How to Add Permissions for Client Users to Access Public Folder Content
            You can use the Add-PublicFolderClientPermission cmdlet or the AddUsersToPFRecursive.ps1 user management script to specify the permissions for the client user. You can create the access rights by using either the predefined permission roles or by creating custom access rights.
          • How to Remove or Replace Public Folder Client Permissions
            You can use the Remove-PublicFolderClientPermission cmdlet or the RemoveUserFromPFRecursive.ps1 script to remove permissions for the client user. You can remove access rights by using either the predefined permission roles or by using the access rights.
            You can use the ReplaceUserWithUserOnPFRecursive.ps1 and ReplaceUserPermissionOnPFRecursive.ps1 scripts to replace client permissions on a public folder.

          • How to View Public Folder Client Permissions Settings
            You can use the Get-PublicFolderClientPermission cmdlet to view the client access rights associated with a public folder.
          • How to Grant the Send As Permission for a Mail-Enabled Public Folder
            You can use Send As permissions to configure a mail-enabled public folder so that users other than the public folder owner can use the mail-enabled public folder to send messages.
            The Send As permission is not granted until after replication has occurred. Replication times depend on your Microsoft Exchange and network configuration.
          • How to Add Administrative Permissions for Users to Access Public Folders
            You can use the Add-PublicFolderAdministratorPermission cmdlet, the Add-ExchangeAdministrator cmdlet, or the Add Exchange Administrator wizard to grant administrative rights for a user to access a public folder or public folder hierarchy.
          • How to Remove Public Folder Administrative Permissions
            You can use the Remove-PublicFolderAdministratorPermission cmdlet, the Remove-ExchangeAdministrator cmdlet, or the Add Exchange Administrator wizard to remove administrative access rights from a user for a public folder or public folder hierarchy.
          • How to View Public Folder Administrative Permission Settings
            You can use the Get-PublicFolderAdministratorPermission cmdlet, the Get-ExchangeAdministrator cmdlet, or the Organization Configuration node to view the administrative rights that are associated with a public folder or public folder hierarchy.
        • Le Café Central de DeVa

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

          • 0 Comments

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

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

          using System;
          using System.Management;

          namespace ConsoleTwo
          {
              class Class1
              {


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

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

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

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

        • Le Café Central de DeVa

          Exchange Server 2007 & OWA : Password change feature

          • 0 Comments

          If you work with Exchange Server 2007, this method is no longer required.  But, it can be used with Windows Server 2003 and Exchange Server 2007 configurations when the ability to change passwords after they have expired or when users are required to change their password at the first logon is needed.

           

          When i was in search mode regards to this, just i found an article by Will Duff, which talks about what we need to know about the OWA Change Password feature of Exchange Server 2007 ? It’s worth of reading…:)

          He not only talks about the OWA & Exchange server 2007, but has various references to it’s previous versions.

          “…The previous versions of Exchange Server utilized the Change Password functionality for IIS 5 and 6 using the IISADMPWD virtual directory and a .DLL file on the server.  These configurations were discussed in the following KB articles:

          FIX: You experience various problems when you use the Password Change pages in IIS 5.0
          http://support.microsoft.com/?kbid=831047

          FIX: You experience various problems when you use the Password Change pages in IIS 6.0
          http://support.microsoft.com/?kbid=833734

          Implementing the Change Password feature with Outlook Web Access
          http://support.microsoft.com/?kbid=297121…”

        • Le Café Central de DeVa

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

          • 1 Comments

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

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

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

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

          Version

          Build number

          Release date

           

           

           

          Microsoft Exchange Server  4.0

          4.0.837

          April 1996

          Microsoft Exchange Server  4.0 (a)

          4.0.993

          August 1996

          Microsoft Exchange Server  4.0 SP1

          4.0.838

          May 1996

          Microsoft Exchange Server  4.0 SP2

          4.0.993

          August 1996

          Microsoft Exchange Server  4.0 SP3

          4.0.994

          November 1996

          Microsoft Exchange Server  4.0 SP4

          4.0.995

          April 1997

          Microsoft Exchange Server  4.0 SP5

          4.0.996

          May 1998

           

           

           

          Microsoft Exchange Server  5.0

          5.0.1457

          March 1997

          Microsoft Exchange Server  5.0 SP1

          5.0.1458

          June 1997

          Microsoft Exchange Server  5.0 SP2

          5.0.1460

          February 1998

           

           

           

          Microsoft Exchange Server  5.5

          5.5.1960

          November 1997

          Microsoft Exchange Server  5.5 SP1

          5.5.2232

          July 1998

          Microsoft Exchange Server  5.5 SP2

          5.5.2448

          December 1998

          Microsoft Exchange Server  5.5 SP3

          5.5.2650

          September 1999

          Microsoft Exchange Server  5.5 SP4

          5.5.2653

          November 2000

           

           

           

          Microsoft Exchange 2000 Server

          6.0.4417

          October 2000

          Microsoft Exchange 2000 Server (a)

          6.0.4417

          January 2001

          Microsoft Exchange 2000 Server SP1

          6.0.4712

          July 2001

          Microsoft Exchange 2000 Server SP2

          6.0.5762

          December 2001

          Microsoft Exchange 2000 Server SP3

          6.0.6249

          August 2002

          Microsoft Exchange 2000 Server post-SP3

          6.0.6487

          September 2003

          Microsoft Exchange 2000 Server post-SP3

          6.0.6556

          April 2004

          Microsoft Exchange 2000 Server post-SP3

          6.0.6603

          August 2004

          Microsoft Exchange 2000 Server post-SP3

          6.0.6620.5

          March 2008   

          Microsoft Exchange 2000 Server post-SP3

          6.0.6620.7

          August 2008

           

           

           

          Microsoft Exchange Server  2003

          6.5.6944

          October 2003

          Microsoft Exchange Server  2003 SP1

          6.5.7226

          May 2004

          Microsoft Exchange Server  2003 SP2

          6.5.7638

          October 2005

          Microsoft Exchange Server  2003 post-SP2

          6.5.7653.33

          March 2008

          Microsoft Exchange Server  2003 post-SP2

          6.5.7654.4

          August 2008  

           

           

           

          Microsoft Exchange Server  2007

          8.0.685.24 or 8.0.685.25

          December 2006

          Microsoft Exchange Server  2007 SP1

          8.1.0240.006

          November 2007

        • Le Café Central de DeVa

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

          • 2 Comments
          '[VBA & Outlook Object Model : Code snippet to delete Outlook recurring Task items (whose status marked as Completed)]
           
          'Declaration part
          ...
          dim otaskitem as Outlook.Taskitem
          dim ofolder as Outlook.Folder
           
          'Get the Task items
          set ofolder = Application.Session.GetDefaultFolder(olFolderTasks)
          For each item in ofolder.items
          set otaskitem = Item
           
          'Check the status of the specific Taskitem is "Completed" or not
          if otaskitem.Status = olTaskcomplete then
          'Msgbox "Completed Tasks"
          otaskitem.Delete
          else
          'Msgbox "Not Completed Tasks"
          end if
          Next
          ....
        • Le Café Central de DeVa

          Troubleshooting: IIS/Exchange logs and WebDAV functions

          • 0 Comments

          You can collect information about client requests by enabling logging for sites and services. IIS logs are stored in %SystemRoot%\system32\Logfiles\<service_name>. If you examine the IIS/Exchange log file you will see the request for the sample application being handled by IIS - you can notice couple of jargons like GET, PUT, POST, MKCOL, LOCK, UNLOCK, PROPFIND, SEARCH, PROPATCH, SUSBCRIBE, UNSUBSCRIBE, POLL etc.

          clip_image002

          The three main HTTP functions used are GET, PUT and POST:

          • GET: Retrieves a document 

          • PUT: Puts an item in a folder 

          • POST: Submits an item to a folder


          In addition to above, there are few more WebDAV functions that are used:

          • MKCOL: Makes a collection that is in essence the same as a Web Storage System folder. MKCOL allows you to make folders and set their properties. 

          • LOCK: Locks documents to prevent writes. 

          • UNLOCK: Allows writes and creates updates. 

          • PROPFIND: Searches for properties individually or for a whole set of folders. 

          • SEARCH: Provides filter, subquery and sort capabilities to a search. 

          • PROPPATCH: Sets arbitrary properties on an item. 

          • SUBSCRIBE: Adds a user to a list. 

          • UNSUBSCRIBE: Removes a user from a list. 

          • POLL: Checks to see if the notification is fired.

          Happy troubleshooting!!

        • Le Café Central de DeVa

          Coding practices : Outlook automation using VB.Net

          • 0 Comments

          You can try when you do programming with VB.Net and Outlook automation:

          • When you start automation code by declaring object variables with a specific object type that represents the top-level object and then declaring any child objects you want to reference.
            Dim olApp  As Outlook.Application

          • You then create an instance of the top-level object by using the Set statement and the New keyword.
          • Set olApp = New Outlook.Application

          Please note: You need to understand that the New keyword can't be used to create a new instance of a child object.

          • To create an instance of a child object, use the appropriate method of the parent object along with the Set statement.
          • Set MailMessage = olApp.CreateItem(olMailItem)

          • At the end of the procedure, each object variable is destroyed by explicitly setting it equal to the Nothing keyword. If you do this, there is no need to use a Set statement to instantiate the object. However, this technique is not recommended because you have no control over when the object variable is created.
          • In detail, if your code must test to see if an object exists by using a statement such as If olApp Is Nothing Then, this test will return True if you have created an instance of the object in the Dim statement. Additionally, you might not need to use an object except at the user's request.
          • If you create an instance of the object by using New in the Dim statement, the object will be created even if it isn't used. To maintain control over when an object is created, don't use the New keyword in the Dim statement, and instantiate the object by using a Set statement at the point in your code where you must use the object.
        • Le Café Central de DeVa

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

          • 1 Comments

          In this blogpost, we will try to create the Outlook Categories programmatically using Outlook Object Model API. Also we will assign the relevant colors and shortcuts to that. Whenever we try with Outlook Object Model, it’s relatively simple.

          '[Code snippet to create Categories]
          Private Sub CreateCategory()
           
              Dim objNameSpace As NameSpace
              Dim objCategory As Category    
            
              ' Obtain a NameSpace object reference
              Set objNameSpace = Application.GetNamespace("MAPI")
              'Add the Category, set its color and shortcutkey, if any
              Set objCategory = objNameSpace.Categories.Add("SampleCat", OlCategoryColor.olCategoryColorDarkBlue, 
          _OlCategoryShortcutKey.olCategoryShortcutKeyNone)
             
             ' Clean up
              Set objCategory = Nothing
              Set objNameSpace = Nothing
              
          End Sub
           
          Happy programming!!
        • Le Café Central de DeVa

          Office Developer : Outlook & VBA Programming # 1

          • 1 Comments

          By using Visual Basic for Applications (VBA), a simple but powerful programming language that you can use to extend Office 2010 applications with new capabilities and automate repeated tasks. I remember VBA is used for a long time in Microsoft Office based applications.

          I thought to combine the list the related articles that are pretty much helpful for you to move ahead:

        • Le Café Central de DeVa

          Debug : Workaround - Remote debugging monitor (msvsmon.exe) error on Windows 7

          • 0 Comments

          I was playing around debugging a custom app in one of my Windows 7 & Visual Studio 2010. When I tried running msvsmon.exe (Remote Debugging Monitor) and got the following error message when attempting to remote debug:

          Error while trying to run project: Unable to start debugging.

          This operation returned because the timeout period expired.

          During further investigation, I found that the issue is that the firewall is not setup properly on the Win7 machine for remote debugging. I noticed that when msvsmon first launches, it will prompt the user to configure the firewall.

          Per the debugger blogpost, this happens due to the firewall security API changes since Vista, the prompt may not come up. I tried the following workaround to move ahead:

          Control Panel->System and Security->Windows Firewall: Change notification settings -> enable Notify me when Windows Firewall blocks a new program ->Ok

          After implementing the above, I started remote debugging again and this time I can notice that msvsmon shows popup a windows security alert dialog box that prompt to grant access permission to msvsmon.

          Happy debugging!!

        • Le Café Central de DeVa

          CASPOL & Add-in : How to Full trust the assemblies ?

          • 0 Comments

          If we want to "fully trust" the assemblies, it can be done through the signed assemblies. In Visual Studio 2005, you need to select the Properties for the project and select the Signing tab.  After you installed (including the newly signed assemblies) you need to give permission to the assemblies. This can be done using a tool called CASPOL.EXE.

          The CASPOL or Code Access Security Policy tool enables users and administrators to modify security policy for the machine policy level, the user policy level, and the enterprise policy level. For detailed information, you can have a look at the following article.

          Find the command line for registering your file: caspol -u -ag All_Code -url "<full path to your file>" FullTrust -n "<assembly name>"

          If you have more than one file or if you want to do this for a directory: caspol -u -ag All_Code -url "<directory path>\*" FullTrust

        • Le Café Central de DeVa

          OWA Customization: PSS support policy for Exchange Server 5.5, 2000 &amp; 2003

          • 1 Comments

          OWA 2003Per the support KB, Microsoft PSS has the support policy for customization of Outlook Web Access for Exchange that cover its versions like 5.5, 2000 & 2003.

          Per the article, we can get more information regarding the support policy for OWA customization for its various versions like,

          “…The Exchange 5.5 version of OWA is made up of Active Server Pages (ASPs).
          The Exchange 2000 and Exchange 2003 versions of OWA are composed of two main components: templates and controls. Templates are served from a binary Internet Server Application Programming Interface (ISAPI) extension that communicates with the Exchange store. Controls are referenced by the templates and are located in the Program Files\Exchsrvr\Exchweb folder. Controls are made up of script or HTML files, such as JScript files (.js), HTML Component files (.htc), cascading style sheet files (.css), Extensible Stylesheet Language (XSL) transform files (.xsl), and graphics files.

           

          You may want to customize OWA by changing features or by modifying the user interface or by using the article. Although you can customize OWA objects by modifying either the script code or the HTML, Microsoft does not recommend that you do so. Microsoft Product Support Services (PSS) also cannot help you with the customization. However, if you want to customize OWA, the following limitations and considerations apply:

          • PSS does not provide assistance to customize OWA objects.
          • If you contact PSS about an OWA issue for a server that OWA is customized on, you must replace the customized files with the original versions of the files and verify that you can reproduce the issue by using the original versions of the files. If the issue occurs only with the customized versions of the files, and you cannot reproduce the issue with the original versions of the files, PSS cannot help you troubleshoot the issue.
          • If you install a service pack or hotfix that updates the files in the Program Files\Exchsrvr\Exchweb folder, any customized files that exist in that folder are overwritten. If you do not want to lose the customizations that you created, create a backup of the customized files, and then restore the files after you install the service pack or hotfix.

          Although PSS cannot help you customize OWA, the following resources are available:

          …”

          But still lot of guys around the world customize the OWA though.

          You can find the following article,

          Customizing the Outlook Web Access Logon Page
          http://technet.microsoft.com/en-us/library/aa996007(EXCHG.65).aspx

          Still want to customize the CSS and Dynamic styles, you can refer these articles,
          W3C: Cascading Style Sheets Home Page
          W3C: Adding a Touch of Style
          W3C: Cascading Style Sheets, level 2: CSS2 Specification
          MSDN: Introduction to Dynamic Styles


          Hope this helps!!

        • Le Café Central de DeVa

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

          • 1 Comments

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

          Syntax: expression.SendAndReceive(showProgressDialog)

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

          Note:

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

          Using with Outlook Object Model & Visual Basic 6:

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

          Using in .Net environment & Outlook interop:

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

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

          Code snippet (used in the add-in):

          C#

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

          then we need to use the SyncObject,

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

          Visual Basic:

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


          Reference(s):

          http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.namespaceclass.sendandreceive.aspx
          http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook.syncobjectevents_event_members.aspx

        • Le Café Central de DeVa

          Securing Exchange Server 2007 & Database Encryption with BitLocker?

          • 2 Comments

          My experience with BitLocker:
          I use Windows BitLocker Drive Encryption (BitLocker) in my Windows Server Vista, 2008 & new Win 7 boxes. As i am trying this for a while, i thought to apply it with Exchange Server 2007 SP2 also; also wanted to see, whether i can make Exchange Server more stronger?

          How i tried?

          Step 1: I tried creating my new installation of Windows Server 2008 machine with SP updates
          Step 2: Tried creating the BitLocker
          Step 3: Tried creating the Exchange Server 2007 SP2

          Let me share the steps that i followed. Also i want to share couple of basics about BitLocker, if you’re interested…

          What’s a BitLocker?
          BitLocker a security feature in the Windows Vista, Windows Server 2008, Windows 7 operating systems that can provide protection for the operating system on your computer and data stored on the operating system volume.

          What BitLocker do?
          Mainly it takes care of the following:

          • It encrypts all data stored on the Windows operating system volume. This includes the Windows operating system, hibernation and paging files, applications, and data used by applications.
          • It is configured by default to use a Trusted Platform Module [TPM] to help ensure the integrity of early startup components (components used in the earlier stages of the startup process), and "locks" any BitLocker-protected volumes so that they remain protected even if the computer is tampered with when the operating system is not running.

          What makes BitLocker – the special?
          What i learnt is… BitLocker is implemented in code in the early startup components ((master boot record (MBR), boot sector, boot manager, Windows Loader)), and as a filter driver that is an integral part of the operating system. When BitLocker is first enabled, existing data on the volume must be encrypted. You can continue to use the computer during this process. 

          Also the BitLocker helps,

          + Address threats that may be caused by data theft or exposure from lost or stolen computers.
          + Data on a lost or stolen computer is vulnerable to unauthorized access if a software program is run on the computer or if the computer's hard disk drives are transferred to a different computer.
          + Reduce unauthorized data access by improving file and system protections.
          + Make data inaccessible when BitLocker-protected computers are decommissioned or recycled.

          To get more information regarding the BitLocker Drive Encryption, you can refer this TechNet article. Also you can refer the BitLocker Encryption  Step-by-Step Guide for more information.

          How this help us with Exchange Server to make it secure?
          In Windows Server 2008, BitLocker protection can be extended to volumes used for data storage as well, along with the protection for the operating system on your computer.

          BitLocker requires that the active partition (or called as system partition) be a non-encrypted partition. The Windows operating system is installed to a second partition that is encrypted by BitLocker. Whenever dealing with the encryption of data, especially in an enterprise environment, you must consider how that data can be recovered in the event of hardware failure, changes in personnel, or other situations in which encryption keys are lost.

          How to do this?
          BitLocker enables an IT administrator to encrypt the operating system volume and additional volumes on a Windows Server 2008-based computer. Let we try this out. By default, BitLocker is not installed in Windows Server 2008. You must add BitLocker from the Server Manager page in Windows Server 2008.

          I tried installing from the command prompt.

          1. Click the Start button, click All Programs, click Accessories, Right-click Command Prompt, and click Run as administrator.

          2. If the User Account Control (UAC) dialog box appears, select Continue.

          3. At the command prompt, type the following:

            ServerManagerCmd -install BitLocker -restart

            This installs BitLocker if you have not already installed it.

          4. After you install and configure BitLocker, you must restart the server to enable the features that BitLocker provides.

          Additionally, what more you can secure?
          As per the TechNet article, you can use BitLocker to encrypt the volumes that host Exchange 2007 database files and transaction log files. Additionally, because the Exchange Storage Engine (ESE) works well with BitLocker, you do not experience a significant performance penalty when you encrypt the volumes that host the Exchange database files and transaction log files.

          Do you know, this is supported by Microsoft CSS?
          As per the TechNet article - because of rigorous testing and because of the integration of BitLocker in Windows Server 2008, Microsoft Customer Support Services fully supports Exchange 2007 for use with BitLocker-encrypted volumes.

           

        • Le Café Central de DeVa

          Admin: How to remove retention policy from Outlook/Exchange?

          • 0 Comments

          ·To remove retention policy from Outlook:

          When you remove a retention policy from an email message, the folder policy applies to the item, if one is assigned.

          1. In the message list, click a message. (To select more than one message, press and hold CTRL as you click each message.)

          2. On the Home tab, in the Tags group, click Assign Policy.

          Outlook

          3. Under Retention Policy, click Use Folder Policy.

          Note: The retention policy for a message appears in the header in the Reading Pane under the recipient names and includes the expiration date. If no retention policy is applied, no information appears under the message recipient names.

          From Exchange:

          You can use the following exchange cmdlet: http://technet.microsoft.com/en-us/library/dd297962.aspx. Please note that the retention policies are used to apply message retention settings to folders and items in a mailbox.

          The below cmdlet removes an existing retention policy "Business Critical", which is assigned to users, and suppresses the confirmation prompt.

          > Remove-RetentionPolicy -Identity "Business Critical" -Confirm:$false -Force

        • Le Café Central de DeVa

          Exchange Server 2007 & Workflow designer for Exchange

          • 1 Comments

          What is CDO for Workflow?

          CDO for Workflow (CDOWF) is built-in functionality provided with Microsoft Exchange 2000 Server. By using CDOWF, which is driven by the Exchange store event architecture, you can design workflow applications without having to write the fundamental code that accesses, modifies, and controls data. CDOWF includes a workflow engine, modeling tools, and an event sink.

          Applications that use CDOWF are stored on the Exchange server. Direct access to that server, however, is not required. The Workflow Designer can be used to deploy workflow applications remotely on an Exchange server, with the requirement that the user have sufficient permissions to access the mailboxes where the application is to be installed.


          Support for Workflow?

          Per the article, if you have developed applications by using the Workflow Designer for Exchange 2000 Server, and you require a copy of the Workflow Designer installation package, please contact Microsoft Customer Support Services. The Workflow Designer for Exchange 2000 Server will be supported while Microsoft Exchange Server 2003 support is available.

          Note: CDOWF does not ship in and is not supported for Microsoft Exchange Server 2007.

          Where can i get more documentation on this?

          Note: The Workflow Designer for Exchange 2000 Server is no longer available for download. The download file that is available here includes only a Readme file, and does not include the Workflow Designer

          Availability..

          Earlier it’s shipped with Exchange 2000 Server and Exchange Server 2003. CDOWF does not ship with and is not supported for Exchange 2007. CDOWF is expected to be enhanced or replaced in a future version of Exchange. So we need to consider using Microsoft BizTalk for more complicated, inter-organizational, and non-messaging related workflow process implementations.

          Future of Exchange Workflow…
          Microsoft recommends that you migrate applications that use Exchange Workflow and the Collaborative Data Objects for Exchange Workflow (CDOWF) to use the Windows Workflow Foundation. It is used to create applications that use workflow and orchestration. The programming model is more up-to-date, and the technology is part of the Windows platform. CDOWF can’t be used in managed code, but as you’d expect, Windows Workflow Foundation can.

          then, what is Windows Workflow Foundation?


           

           

           

           

           

           

           

           

           

           

          Windows Workflow Foundation supplies the programming model, engine, and tools required to quickly build workflow-enabled applications on Microsoft Windows.

          • It consists of a namespace, an in-process workflow engine, and designers for Microsoft Visual Studio 2005.
          • Applications that use Windows Workflow Foundation can be developed and run on Microsoft Windows Vista, Microsoft Windows XP, and the Microsoft Windows Server 2003 family.
          • Windows Workflow Foundation includes support for both system workflow and human workflow across a variety of scenarios, including workflow within line-of-business applications, user interface page flow, document-centric workflow, human workflow, composite workflow for service-oriented applications, business rule–driven workflow, and workflow for systems management.

          Where can i get more information on this…

          Windows Workflow Foundation
          Understanding Tracking in Windows Workflow Foundation
          WF Tutorial: Building Sequential Workflows for Windows Workflow Foundation

          Documentation:

          Related articles:

          Channel9

        • Le Café Central de DeVa

          Download Office 2010 tool : Office Environment Assessment Tool (OEAT)

          • 0 Comments

          Microsoft released environment scanning tool as download for the Assessment planning. As you know the goal of the assessment planning phase is to determine the techniques that will be used to discover applications and customizations that could be affected by an Office upgrade.This tool (along with documentation) assists a customer in the assessment phase of deployment.

          It identifies:

          • Currently installed applications and installation environment
          • Add-ins currently in use by Office clients
          • Programs that are not registered as add-ins but still interact with Office programs
          • Reports:
            • Environmental assessment (potential upgrade issues)
            • Add-ins assessment–list of third party programs and information about the compatibility of those programs with Microsoft Office 2010

          This tool collects information for the following Office applications:

          • Microsoft Office 97, Microsoft Office 2000, Microsoft Office XP, Microsoft Office 2003, 2007 Microsoft Office system, Microsoft Office 2010

          In addition, you must have the following applications installed:

          • Microsoft .NET Framework 2.0, Microsoft Office Excel 2007 (-OR-) Microsoft Excel 2010
        • Le Café Central de DeVa

          SMTP Commands Part # 1- List of SMTP Commands

          • 2 Comments

          Please find the list of SMTP commands and its definitions, which can be used on multiple places. For example it can be used to check event SMTP sinks by sending mails.

          SMTP commands

          SMTP command

          Command function

          HELO

          Sent by a client to identify itself, usually with a domain name.

          EHLO

          Enables the server to identify its support for Extended Simple Mail Transfer Protocol (ESMTP) commands.

          MAIL FROM

          Identifies the sender of the message; used in the form MAIL FROM:.

          RCPT TO

          Identifies the message recipients; used in the form RCPT TO:.

          TURN

          Allows the client and server to switch roles and send mail in the reverse direction without having to establish a new connection.

          ATRN

          The ATRN (Authenticated TURN) command optionally takes one or more domains as a parameter. The ATRN command must be rejected if the session has not been authenticated.

          SIZE

          Provides a mechanism by which the SMTP server can indicate the maximum size message supported. Compliant servers must provide size extensions to indicate the maximum size message that can be accepted. Clients should not send messages that are larger than the size indicated by the server.

          ETRN

          An extension of SMTP. ETRN is sent by an SMTP server to request that another server send any e-mail messages that it has.

          PIPELINING

          Provides the ability to send a stream of commands without waiting for a response after each command.

          CHUNKING

          An ESMTP command that replaces the DATA command. So that the SMTP host does not have to continuously scan for the end of the data, this command sends a BDAT command with an argument that contains the total number of bytes in a message. The receiving server counts the bytes in the message and, when the message size equals the value sent by the BDAT command, the server assumes it has received all of the message data.

          DATA

          Sent by a client to initiate the transfer of message content.

          DSN

          An ESMTP command that enables delivery status notifications.

          RSET

          Nullifies the entire message transaction and resets the buffer.

          VRFY

          Verifies that a mailbox is available for message delivery; for example, vrfy ted verifies that a mailbox for Ted resides on the local server. This command is off by default in Exchange implementations.

          HELP

          Returns a list of commands that are supported by the SMTP service.

          QUIT

          Terminates the session.

          The following table lists the extended SMTP commands that Exchange makes available to the SMTP service.

          Extended SMTP commands

          Extended SMTP command

          Command function

          X-EXPS GSSAPI

          A method that is used by Microsoft Exchange Server 2003 and Exchange 2000 Server servers to authenticate.

          X-EXPS=LOGIN

          A method that is used by Exchange 2000 and Exchange 2003 servers to authenticate.

          X-EXCH50

          Provides the ability to propagate message properties during server-to-server communication.

          X-LINK2STATE

          Adds support for link state routing in Exchange.

        • Le Café Central de DeVa

          Outlook Custom form : Creating a message class when customizing form pages

          • 0 Comments
          In the Publish Form As dialog box, when you type a name in the Display name field, you will notice that the Form name field reflects the display name by default. You can leave the form name to be the same as the display name or you can change the form name. The display name will be the caption at the top of your form. The display name will also be used to construct the name under which your form will be published. When you publish your form, the display name will be listed in the Choose Form dialog box.

          Outlook automatically constructs a message class for the form by preceding the form name with IPM. For instance, if you publish a mail message form that you want to name "MyForm", in the Display name field, type: This is my Form. In the Form name field, type: MyForm. At the bottom of the dialog box, Outlook will display the message class for your new form as: IPM.Note.MyForm.

          When you search in the Choose Form dialog box, you will see "This is my Form" displayed in the list. If you select it, the Display name field at the bottom of the dialog box will display, "This is my Form" and the Form name field will display, "MyForm".

          A message class, which is generated automatically by Outlook from the form name, is assigned to the form. When a form with that message class is selected, Outlook loads and displays an instance of that form. Outlook will use the message class, IPM.Note.MyForm, to locate the form with the display name, "This is my Form".

          Please note:

          • The message class is an internal identifier used by Microsoft Office Outlook and Microsoft Exchange to locate and activate a form .
          • The message class property corresponds to the MAPI property PR_MESSAGE_CLASS.
          • This class property determines which receiving folder the message should be routed to and which form should be activated to view the message.
        • Le Café Central de DeVa

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

          • 1 Comments

          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.

        Page 4 of 26 (649 items) «23456»