Unsure why this automatic Calendar reminder is not working.

PaulOPTC

New Member
Joined
Jan 13, 2022
Messages
48
Office Version
  1. 365
Platform
  1. Windows
VBA Code:
Sub COOutlookReminder()

    Dim OutApp As Object
    Dim OutMail As Object
    Dim strbody As String
    Dim myRequiredAttendee As Variant
    



    Dim Address             As Variant
    


    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(olAppointmentItem)
    
    
    
   strbody = "<H5>Good Afternoon,</H5> " & _
              "This is an automated e-mail. It has been Two weeks since you sent out this change order, please follow up.<br>" & _
              "<br><br>Thank you, Have a great day!" & _
              "<br><br>"
  
  

    With OutMail
        .MeetingStatus = olMeeting
        .Start = Cells(15, 26).Value
        .Duration = 15
        .Subject = Cells(14, 26).Value
        .Location = Cells(14, 26).Value
        .Body = strbody
        .BusyStatus = olBusy
        .ReminderMinutesBeforeStart = 15
        .ReminderSet = True
        .Save
        For Each Address In Split(Range("Z23"), ";")
            Set myRequiredAttendee = .Recipients.Add(Address)
            myRequiredAttendee.Type = olRequired
        Next
        .Send
    End With


    Set OutMail = Nothing
    Set OutApp = Nothing
    
End Sub


Hoping you can help me figure this out, Looking to send a reminder to myself and my coworker two weeks after I run this code to follow up with it.

Any ideas why this isn't working?

Its getting caught on
With OutMail
.MeetingStatus = olMeeting
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
You need to activate reference to "Micosoft Outlook 1x.0 Object Library" from VBE menu Settings / Reference.
 
Upvote 0
Solution
That is what you always need to check when using an Object (see first part of your macro) not integrated in Excel.
Thanks for the positive feedback(y), glad having been of some help.
 
Upvote 0

Forum statistics

Threads
1,214,891
Messages
6,122,101
Members
449,066
Latest member
Andyg666

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top