I am using the reference 'Microsoft CDO 1.21 Library' to allocate an appointment to myself within my Outlook Calendar. How can I send an appointment to another Outlook Account so that it only appears within the other Outlook Account and not my own? The code I am using to assign an appointment to myself is:
Dim cdoMySession As Session
Set cdoMySession = New Session
cdoMySession.Logon "Outlook"
Dim cdoFolder As Folder
Dim cdoStore As InfoStore
Dim cdoMess As Message
Dim mycdomessages As Messages
Dim cdoAppt As AppointmentItem
For Each cdoStore In cdoMySession.InfoStores
If cdoStore.name = "Mailbox - " & <account> Then
For Each cdoFolder In cdoStore.RootFolder.Folders
If cdoFolder.name = "Calendar" Then
Set cdoFolder = cdoMySession.GetDefaultFolder _
(CdoDefaultFolderCalendar)
Set mycdomessages = cdoFolder.Messages
Set cdoAppt = mycdomessages.Add
cdoAppt.StartTime = "2003/05/01 22:00"
cdoAppt.EndTime = "2003/05/01 22:30"
cdoAppt.Update
End If
Next
End If
Next
Any help would be greatly appreciated.
Dim cdoMySession As Session
Set cdoMySession = New Session
cdoMySession.Logon "Outlook"
Dim cdoFolder As Folder
Dim cdoStore As InfoStore
Dim cdoMess As Message
Dim mycdomessages As Messages
Dim cdoAppt As AppointmentItem
For Each cdoStore In cdoMySession.InfoStores
If cdoStore.name = "Mailbox - " & <account> Then
For Each cdoFolder In cdoStore.RootFolder.Folders
If cdoFolder.name = "Calendar" Then
Set cdoFolder = cdoMySession.GetDefaultFolder _
(CdoDefaultFolderCalendar)
Set mycdomessages = cdoFolder.Messages
Set cdoAppt = mycdomessages.Add
cdoAppt.StartTime = "2003/05/01 22:00"
cdoAppt.EndTime = "2003/05/01 22:30"
cdoAppt.Update
End If
Next
End If
Next
Any help would be greatly appreciated.