adding a task or appt to a calendar

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
 
D

David C. Holley

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top