adding a task or appt to a calendar

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to add 2 appointments into two different calendars, one is my
default calendar and one is a shared calendar

i can get it to the default calendar by use of the following code

Set nms = appOutlook.GetNamespace("mapi")
Set fld = nms.GetDefaultFolder(olFolderCalendar)
Set itms = fld.Items
MsgBox Val([due at our location])
If Val([due at our location]) > 0 Then
Duedate = ([due at our location])
Duedate = Duedate + 0.5
Else
Duedate = Now()
End If
MsgBox Duedate + 0.5

Set appOl = CreateObject("outlook.application")
strSubject = "Purchase order #" & [Purchase Order No] & " From " & [To]
& " Is Due or past due"

Set Appt = itms.Add("IPM.Appointment")
With Appt
.Subject = (("Purchase order #" & [Purchase Order No]))
.Categories = strSubject
.Importance = olImportanceHigh
.Start = Duedate
.End = Duedate
.RequiredAttendees = "SteveF"
.Close (olSave)
End With

i have not been able to figure out where my shared calendar shipping is to
write to that appt list, any help would be much apreciated.

Thank you
 
Off the top of my head, there should be a method of the Namespace object
that will allow you to retrieve the folder by name.
 
Back
Top