Click to See Complete Forum and Search --> : Setting contact to appointment / journal item
Beengie
Jan 10th, 2006, 06:45 PM
How do you set contacts for appointments and journal items?
RobDog888
Jan 10th, 2006, 07:12 PM
You need to add a contact as a receipient of the appointment item.
oApptItem.Recipients.Add ("RobDog888")
Beengie
Jan 10th, 2006, 07:29 PM
do I need to create a recipient object?
BTW I am doing this with VBA
I am not sure if I am on the right track. I am confused when it comes to the "recipients" collection and "recipient" object when it relates to a journal item.
I tried to create a recipient object and add it to the journal item, but it did not work. The contacts field was empty when I opened the item in the Outlook UI.
Private Sub CreateJournalItem()
Dim objappitm As Outlook.JournalItem
Dim objRecip As Outlook.Recipient
Set objappitm = Outlook.CreateItem(olJournalItem)
Set objRecip = objappitm.Recipients.Add(cboContact.text)
objappitm.Companies = "Acme"
objappitm.Subject = txtSubject.Text
objappitm.Type = "Phone Call" & " (reveived)"
objappitm.Start = txtDate.Text & " " & txtTime.Text
objappitm.Duration = 30
objappitm.Recipients.Add objRecip
objappitm.Save
End Sub
what's wrong with this code?
thanks for the help
Beengie
Jan 10th, 2006, 07:39 PM
I tried what you posted, but there is nothing in the contacts field for any example I try.
RobDog888
Jan 10th, 2006, 07:45 PM
For the ContactItem you also need to do a .Recipients.ResolveAll
Beengie
Jan 10th, 2006, 07:51 PM
Contact item?
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.