Link to home
Start Free TrialLog in
Avatar of ashugarg00
ashugarg00

asked on

MS Outlook Calendar Programming using VB

I want an access the outlook calendar object (ie  i want access to access any date and and time of the calendar object)in my vb add - in code. Please help me out. It is very urgent.
Thanks.
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ashugarg00
ashugarg00

ASKER

Hello BlueDevilFan

I have written this chunk of code,


Dim oOutlook As Outlook.Application
Dim oOLNameSpace As Outlook.NameSpace
Dim oCalendar As Outlook.MAPIFolder
Dim colCalItems As Outlook.Items

'Create an Outlook session
Set oOutlook = CreateObject("Outlook.Application")
Set oOLNameSpace = oOutlook.GetNameSpace("MAPI")

' Piggy back existing session
oOLNameSpace.Logon "","",false,false

' Get a reference to the default calendar folder
Set oCalendar = oOLNameSpace.GetDefaultFolder(olFolderCalendar)

' Get a reference to all items in the calendar
Set colCalItems = oCalendar.Items


Now i need to read entries which are present at a particular date or time in the outlook calendar.
eg .
Suppose i have added an entry on 6/8/2005 at 9.00 AM as Brekfast time and
another one on 6/8/2005 at 1.00 PM as lunch time how do i use the calendar object to retrieve this data into my VB code

Please help me with the code.
thanks.
I answered this in your other open question.