Tuesday, May 23, 2006

Honestly speaking I love programming Outlook, especially Outlook 2003 which provides enough flexibility to integrate with your applications.

This code of snippet is a small example of how you can fetch inbox messages. Before trying this piece of code add a reference for Microsoft Outlook 11.0 Object Library

Language : C#

// to prevent clashing from Application class.

using OutLookApp = Microsoft.Office.Interop.Outlook ;

OutLookApp.ApplicationClass objOutlook = new OutLookApp.ApplicationClass() ;
OutLookApp.NameSpace objNameSpace = objOutlook.GetNamespace("MAPI") ;
OutLookApp.MAPIFolder inboxFolder = objNameSpace.GetDefaultFolder(OutLookApp.OlDefaultFolders.olFolderInbox) ;
MessageBox.Show("You have " +  inboxFolder.Items.Count + "e-mails.") ;

ListViewItem lvt = new ListViewItem() ;

   int i = 0 ;

   foreach(object obj in inboxFolder.Items)
   {
    OutLookApp.MailItem item = obj as OutLookApp.MailItem;

    if(item != null)
    {
      lvt = this.listView1.Items.Add(item.Subject, i) ;
      lvt.SubItems.Add(item.SenderName) ;
      lvt.SubItems.Add(item.ReceivedTime.ToString()) ;
      lvt.SubItems.Add(item.Body.ToString()) ;
      i++ ;
    }
   }

Enjoy reading.

Cheers,

~Danish Sami

5/23/2006 1:59:55 PM UTC  #    Disclaimer  |  Comments [1]  | 
 Monday, May 15, 2006

Windows Authenticating a user is as easy as it sounds.

Cheers,

5/15/2006 10:20:24 AM UTC  #    Disclaimer  |  Comments [0]  | 
 Friday, May 12, 2006

This week we will discuss about the Designing of .Net Class Library

See you at Grano Coffee Shop on 18th May, at 19:00 hrs

Try to be on time.

As a token of advice try to start one hour earlier cause you already have an idea about traffic ;-)

Thanks.

5/12/2006 10:51:25 AM UTC  #    Disclaimer  |  Comments [0]  | 
 Thursday, May 04, 2006

Features and Improvments in SQL Server 2005 through Service Pack 1 (SP1)

These are the areas covered by this latest Service Pack 1 of SQL Server 2005.

  • Analysis Services
  • Data Programmability
  • Integration Services
  • Manageability
  • Replication
  • Reporting Services
  • Database Engine
  • Express Edition
  • Management Studio Express

Related link:

KB Article on details of SP1: http://support.microsoft.com/kb/916940

KB Article on how to get SP1: http://support.microsoft.com/kb/913089/

Press Release: http://www.microsoft.com/presspass/press/2006/apr06/04-19SQLExpands06PR.mspx

5/4/2006 6:33:59 PM UTC  #    Disclaimer  |  Comments [0]  |