VBA Code for Outlook reminder

howard

Well-known Member
Joined
Jun 26, 2006
Messages
6,561
Office Version
  1. 2021
Platform
  1. Windows
I have written code to reminder me of the due date in cell C6. I would like to amend the code so that reminder are sent to Outlook calender for C7 onwards where there is no blank cell


See Sample Data and code



Excel 2012
ABCDEF
123/08/2017
2No.BranchReminder Due Date-10Due DateDurationSubject
31BR120/11/2017 8:0030/11/201730BR1 is due on 30/11/2017
42BR210/01/2018 8:0020/01/201830BR2 is due on 20/01/2018
53BR310/01/2018 8:0020/01/201830BR3 is due on 20/01/2018
64BR410/01/2018 8:0020/01/201830BR4 is due on 20/01/2018
75BR520/11/2017 8:0030/11/201730BR5 is due on 30/11/2017
License Due Dates




Code:
 Sub Reminders()
    Dim appOL As Object
     Dim objReminder As Object
     
    Set appOL = GetObject(, "Outlook.application")
     Set objReminder = appOL.CreateItem(1) ' olAppointmentItem
     
     objReminder.Start = Range("C6")
     objReminder.Duration = Range("E6") ' 30
     objReminder.Subject = Range("F6") ' subject text
     objReminder.ReminderSet = True
     objReminder.Save
End Sub

It would be appreciated if someone could kindly assist me


I have also posted on Sending Reminder of due date to Outlook calender via Excel
 
Last edited:

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Thanks for the link


However when using the code supplied on my Workbook and running the macro, I get a compile error "Üser-defined object not defined"


It would be appreciated if you could assist me
 
Upvote 0
I have amended my code , but the when running the macro, it only sends a reminder for the item in the last row

It would be appreciated if someone could amend my code to send reminders to outlook calendar for all the rows containing data




Code:
 Sub Reminders()
    Dim appOL As Object
     Dim objReminder As Object
     Dim I As Long
     
    Set appOL = GetObject(, "Outlook.application")
     Set objReminder = appOL.CreateItem(1) ' olAppointmentItem
     I = 3
     Do Until Trim(Cells(I, 1).Value) = ""

     objReminder.Start = Range("C" & I)
     objReminder.Duration = Range("E" & I) ' 30
     objReminder.Subject = Range("F" & I) ' subject text
     objReminder.ReminderSet = True
     objReminder.Save
      I = I + 1
        Loop

End Sub
 
Upvote 0

Forum statistics

Threads
1,213,528
Messages
6,114,154
Members
448,553
Latest member
slaytonpa

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