Hello,
I am able to create an Outlook appointment from Excel using code I got from : [URL unfurl="true"]http://www.mrexcel.com/forum/excel-questions/553718-excel-visual-basic-applications-update-create-delete-appointments.html[/url]
In most cases, I have to update a created appointment to add new information. Can anyone give me any suggestions in how to do this?
Any help would be greatly appreciated.
dvirgint
I am able to create an Outlook appointment from Excel using code I got from : [URL unfurl="true"]http://www.mrexcel.com/forum/excel-questions/553718-excel-visual-basic-applications-update-create-delete-appointments.html[/url]
Code:
Option Explicit
Public Function CheckAppointment(ByVal argCheckDate As Date) As Boolean
Dim oApp As Outlook.Application
Dim oNameSpace As Outlook.Namespace
Dim oApptItem As Outlook.AppointmentItem
Dim oFolder As Outlook.MAPIFolder
Dim oMeetingoApptItem As Outlook.MeetingItem
Dim oObject As Object
On Error Resume Next
' check if Outlook is running
Set oApp = GetObject("Outlook.Application")
If Err <> 0 Then
'if not running, start it
Set oApp = CreateObject("Outlook.Application")
End If
Set oNameSpace = oApp.GetNamespace("MAPI")
Set oFolder = oNameSpace.GetDefaultFolder(olFolderCalendar)
CheckAppointment = False
For Each oObject In oFolder.Items
If oObject.Class = olAppointment Then
Set oApptItem = oObject
If oApptItem.Start = argCheckDate Then
CheckAppointment = True
End If
End If
Next oObject
Set oApp = Nothing
Set oNameSpace = Nothing
Set oApptItem = Nothing
Set oFolder = Nothing
Set oObject = Nothing
End Function
In most cases, I have to update a created appointment to add new information. Can anyone give me any suggestions in how to do this?
Any help would be greatly appreciated.
dvirgint