Hi,
I am using the following macro to post dates from excel into outlook, however, each time I run the macro it duplicates the entry in Outlook. Any help on how to stop this would be greatly appreciated:
Sub AddAppointments()
' Create the Outlook session
Set myOutlook = CreateObject("Outlook.Application")
' Start at row 5
r = 5
Do Until Trim(Cells(r, 1).Value) = ""
' Create the AppointmentItem
Set myApt = myOutlook.createitem(1)
' Set the appointment properties
myApt.Subject = Cells(r, 6).Value & " Reset"
myApt.Location = Cells(r, 1).Value
myApt.Start = Cells(r, 33).Value
myApt.Duration = 0
myApt.BusyStatus = 0
myApt.ReminderSet = True
myApt.ReminderMinutesBeforeStart = 720
myApt.Save
r = r + 1
Loop
End Sub
I am using the following macro to post dates from excel into outlook, however, each time I run the macro it duplicates the entry in Outlook. Any help on how to stop this would be greatly appreciated:
Sub AddAppointments()
' Create the Outlook session
Set myOutlook = CreateObject("Outlook.Application")
' Start at row 5
r = 5
Do Until Trim(Cells(r, 1).Value) = ""
' Create the AppointmentItem
Set myApt = myOutlook.createitem(1)
' Set the appointment properties
myApt.Subject = Cells(r, 6).Value & " Reset"
myApt.Location = Cells(r, 1).Value
myApt.Start = Cells(r, 33).Value
myApt.Duration = 0
myApt.BusyStatus = 0
myApt.ReminderSet = True
myApt.ReminderMinutesBeforeStart = 720
myApt.Save
r = r + 1
Loop
End Sub