Hello, i have a question. i have a for..next loop in which i create many different appointments in MS Outlook.
When i start the code many outlook appointments pop-up in the background, so i see the loop is creating my appointments.
But after 2 minutes i get an error there isn't enough memory or system recources.
What can i do? I allready tried a threading.sleep(3sec.) in my program but with no succes?!
Any help?!!! Thanx
This is the code:
CODE
Try
With newAppointment
.Start = werkdag & " " & starttijd
.End = werkdag & " " & eindtijd
.Location = "Elzenhorst"
.Body = "Ivonne werken"
.Subject = "Ivonne werken"
.AllDayEvent = False
.Recipients.Add("Hans van Neerven")
Dim sentTo As Outlook.Recipients = .Recipients
'Dim sentInvite As Outlook.Recipient
'sentInvite = sentTo.Add("Holly Holt")
'sentInvite.Type = Outlook.OlMeetingRecipientType.olRequired
'sentTo.ResolveAll()
.Save()
.Display(False)
.Close(SaveMode:=1)
End With
Catch ex As System.Exception
MessageBox.Show("The following error occurred: " & _
ex.Message)
End Try
Else
End If
Next
'System.Threading.Thread.Sleep(3000)
Maybe it has something to do with releasing the created outlook application?
This post has been edited by Hanzie: 25 Jun, 2009 - 01:12 PM