Mindfire Solutions
Home  |  Faq  |  Site map  |  Contact
Email sales@ or Call 1-248-686-1424
Share on Facebook Share on Twitter Share On Linkedin  
Share
Open Outlook folder dialog and select folder using VB.NET
Author: Amrita Dash

Following is the code sample used to display the outlook folder dialog using VB.NET

 
[VB.NET CODE STARTS]

Dim objOutlook As Object
Dim objOlNamespace As Object
Dim objOlFolder As Object

objOutlook = CreateObject("Outlook.Application") ' create outlook application object at the run time
objOlNamespace = objOutlook.GetNamespace("MAPI")
objOlFolder = objContactsNS.PickFolder ' displays the folder dialog
 
[VB.NET CODE ENDS]
 

The [DefaultItemType] property of the outlook folder object can be used to check the outlook items type (contacts \ appointments \ tasks etc.)

For contacts [DefaultItemType] is 2 , similarly for appointments its 1 and tasks its 3.

Related Tags:
VB.NET, Outlook

top