Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDO - Setting an Appointment on another users calendar

Status
Not open for further replies.

trezlub

Programmer
May 2, 2003
67
GB
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 = &quot;Mailbox - &quot; & <account> Then
For Each cdoFolder In cdoStore.RootFolder.Folders

If cdoFolder.name = &quot;Calendar&quot; Then
Set cdoFolder = cdoMySession.GetDefaultFolder _
(CdoDefaultFolderCalendar)
Set mycdomessages = cdoFolder.Messages
Set cdoAppt = mycdomessages.Add
cdoAppt.StartTime = &quot;2003/05/01 22:00&quot;
cdoAppt.EndTime = &quot;2003/05/01 22:30&quot;
cdoAppt.Update
End If
Next
End If
Next

Any help would be greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top