PDA

View Full Version : Create outlook reminder from excel



gotid
12-05-2017, 03:18 PM
Hello again,

I have a gym and i want to create a worksheet that reminds me when i should contact a member to upgrade is training plan.

This is the workbook:


The ideia is that i insert the delivery date and then it gives me automaticly the 1º contact, 2 contact, 3 contact and 4 contact, each one with 30 days diference.

then, when i click create reminder, the macro will read the row and creates an outlook reminder, and, if possible, send and automaticly email in that day.

Could someone hepl me with this, please?

thanks

Kenneth Hobs
12-05-2017, 09:21 PM
Welcome to the forum!

Maybe this will help. http://www.vbaexpress.com/forum/showthread.php?61397-Code-that-adds-new-appointments-to-Outlook&p=373219
or...

'https://www.excelforum.com/excel-programming-vba-macros/1209170-how-set-a-reminder-in-outlook-with-vba-excel.html
Sub Main()
CreateOLtask "Test Subject", "Test String", Date, Now + TimeValue("00:10:00")
End Sub


Sub CreateOLtask(sSubject As String, sBody As String, dDueDate As Date, dReminderTime As Date)
'Early Binding: Tools > References > Microsoft Outlook xx.0 Object Library > OK
Dim oApp As New Outlook.Application
Dim oNS As Outlook.Namespace, oTI As TaskItem


Set oNS = oApp.GetNamespace("MAPI")
Set oTI = oApp.CreateItem(olTaskItem)
With oTI
.Subject = sSubject
.DueDate = dDueDate
.Status = olTaskInProgress
.ReminderSet = True
'.ReminderTime = (strDueDate) & " " & CDate(#9:00:00 AM#)
.ReminderTime = dReminderTime
.Categories = "Task From Excel"
.Body = sBody
.Save
'.Display
End With


Set oTI = Nothing
Set oNS = Nothing
Set oApp = Nothing
End Sub

gotid
12-11-2017, 11:13 AM
I was not able to get the formula working :(

gotid
12-11-2017, 11:18 AM
How can i put the formula in the worsheet?