Rickymundo
Gebruiker
- Lid geworden
- 20 aug 2012
- Berichten
- 30
Hi all,
Ik probeer een agenda verzoek te creëren. Dus een popup maar dat loopt nog niet helemaal lekker, althans, 1 error. Waarschijnlijk heel makkelijk, maar ik kom er niet uit.
Wat gaat er mis:
Ik probeer een agenda verzoek te creëren. Dus een popup maar dat loopt nog niet helemaal lekker, althans, 1 error. Waarschijnlijk heel makkelijk, maar ik kom er niet uit.
Wat gaat er mis:
Code:
Imports Microsoft.Office.Interop
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim newAppointment As Outlook.AppointmentItem = Me.Application.CreateItem _
(Outlook.OlItemType.olAppointmentItem)
Try
With newAppointment
.Start = Date.Now.AddHours(2)
.End = Date.Now.AddHours(3)
.Location = "ConferenceRoom #2345"
.Body = _
"We will discuss progress on the group project."
.Subject = "Group Project"
.AllDayEvent = False
.Recipients.Add("Roger Harui")
Dim sentTo As Outlook.Recipients = .Recipients
Dim sentInvite As Outlook.Recipient
sentInvite = sentTo.Add("Holly Holt")
sentInvite.Type = Outlook.OlMeetingRecipientType.olRequired
sentInvite = sentTo.Add("David Junca")
sentInvite.Type = Outlook.OlMeetingRecipientType.olOptional
sentTo.ResolveAll()
.Save()
.Display(True)
End With
Catch ex As Exception
MsgBox("The following error occurred: " & _
ex.Message)
End Try
End Sub
End Class