+ Reply to Thread
Results 1 to 4 of 4

Sending reminders in Outlook from a date field in Excel

  1. #1
    Registered User
    Join Date
    01-13-2009
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    7

    Sending reminders in Outlook from a date field in Excel

    I have seen previous threads regarding this but I am still struggling with it.

    Can somebody please tell me where I need to put the code below, and also, do I need the Excel spreadsheet open at the time for the Reminder to be sent?

    Sub CreateTasks()

    Dim olApp As Object
    Dim olTask As Object
    Dim LastRow As Long
    Dim i As Long

    Set olApp = CreateObject("Outlook.Application")

    LastRow = Cells(Rows.Count, "C").End(xlUp).Row

    For i = 2 To LastRow
    If Cells(i, "C").Value <> "" Then
    Set olTask = olApp.CreateItem(3) 'olTaskItem
    With olTask
    .Subject = "Invoice - " & Cells(i, "B").Value
    .Body = "Reminder for Maturity in " & Cells(i, "B").Value & "."
    .Status = 1 'olTaskInProgress
    .Importance = 2 'olImportanceHigh
    .DueDate = Cells(i, "C").Value
    .ReminderSet = True
    .ReminderTime = Cells(i, "C").Value + TimeValue("08:45:00")
    .Save
    End With
    End If
    Next i

    End Sub

  2. #2
    Registered User
    Join Date
    12-18-2012
    Location
    FL, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sending reminders in Outlook from a date field in Excel

    Assuming that you have open an XL worksheet on which this code can operate...

    Hit ALT+F11 to open the VBA code editor, paste code, hit F5 to run the code. Should work.

    The reminders will be created in Outlook so you do not need to have the spreadsheet open for them to fire; you should be able to see the reminders in your Outlook by looking at your Tasks.

  3. #3
    Registered User
    Join Date
    01-13-2009
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Sending reminders in Outlook from a date field in Excel

    Will give this a go

    many Thanks

  4. #4
    Registered User
    Join Date
    01-13-2009
    Location
    Wales
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Sending reminders in Outlook from a date field in Excel

    This has done the job

    If I add data to another sheet in similar format will the code know to ignore it?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1