M
Mike R
Hi,
My program reads Sues calendar, displays the appointment - all ok,
Sue modified her appointment, saves it. My program reads her calendar and
doesnt pick up the changes she has just made. It appears to work fine in
VB6, however, I need to use VB.NET.
Anybody have any thoughts - or has got this working? I read that maybe you
could use CDO to do the same thing, if so, could someone post a snippet of
code that points me in the correct direction.
Kind Regards
Mike
---------------
My code :
Private Sub Command1_Click()
Dim NS As Outlook.NameSpace
Dim MyOLApp As Outlook.Application
Dim MyRecipient As Outlook.Recipient
Dim cf As mapiFolder
Dim MyItems As Outlook.Items
Dim MyCalItem As Outlook.AppointmentItem
Set MyOLApp = New Outlook.Application
Set NS = MyOLApp.GetNamespace("MAPI")
NS.Logon "E4SE", , False, True
Set MyRecipient = NS.CreateRecipient("Sue")
Set cf = NS.GetSharedDefaultFolder(MyRecipient, olFolderCalendar)
Set MyItems = cf.Items
Set MyCalItem = MyItems.GetFirst
MyCalItem.display
NS.Logoff
Set NS = Nothing
End Sub
My program reads Sues calendar, displays the appointment - all ok,
Sue modified her appointment, saves it. My program reads her calendar and
doesnt pick up the changes she has just made. It appears to work fine in
VB6, however, I need to use VB.NET.
Anybody have any thoughts - or has got this working? I read that maybe you
could use CDO to do the same thing, if so, could someone post a snippet of
code that points me in the correct direction.
Kind Regards
Mike
---------------
My code :
Private Sub Command1_Click()
Dim NS As Outlook.NameSpace
Dim MyOLApp As Outlook.Application
Dim MyRecipient As Outlook.Recipient
Dim cf As mapiFolder
Dim MyItems As Outlook.Items
Dim MyCalItem As Outlook.AppointmentItem
Set MyOLApp = New Outlook.Application
Set NS = MyOLApp.GetNamespace("MAPI")
NS.Logon "E4SE", , False, True
Set MyRecipient = NS.CreateRecipient("Sue")
Set cf = NS.GetSharedDefaultFolder(MyRecipient, olFolderCalendar)
Set MyItems = cf.Items
Set MyCalItem = MyItems.GetFirst
MyCalItem.display
NS.Logoff
Set NS = Nothing
End Sub