Results 1 to 5 of 5

Use VBA in Excel to add automatic 2 week reminder from start date in Outlook

Threaded View

  1. #1
    Forum Contributor
    Join Date
    03-02-2010
    Location
    Northumberland, England
    MS-Off Ver
    Excel 2016
    Posts
    143

    Use VBA in Excel to add automatic 2 week reminder from start date in Outlook

    Hi

    Id like to add a 2 week reminder (20160 minutes) into this code onlt if there is a date in the start column (col 9). Is this at all possible. Ive tried adding a default 20160 value in The reminder column of my spreadsheet but its add reminders to all 268 rows. Thanks in advance

    Private Sub CommandButton1_Click()
    If Not ThisWorkbook.Name = "LD TOOL v2.xlsm" Then
    ' Create the Outlook session
        Set myOutlook = CreateObject("Outlook.Application")
    
        ' Start at row 5
        r = 6
    Application.ScreenUpdating = False
        Do Until Trim(Cells(r, 1).Value) = ""
            ' Create the AppointmentItem
            Set myApt = myOutlook.createitem(1)
            ' Set the appointment properties
            myApt.Subject = Cells(r, 1).Value
            myApt.Start = Cells(r, 9).Value
            myApt.Location = Cells(r, 10).Value
            myApt.Duration = Cells(r, 11).Value
            ' If Busy Status is not specified, default to 2 (Busy)
            If Trim(Cells(r, 12).Value) = "" Then
                myApt.BusyStatus = 2
            Else
                myApt.BusyStatus = Cells(r, 12).Value
            End If
            If Cells(r, 13).Value > 0 Then
                myApt.ReminderSet = True
                myApt.ReminderMinutesBeforeStart = Cells(r, 13).Value
            Else
                myApt.ReminderSet = False
            End If
            myApt.Body = Cells(r, 14).Value
            myApt.Save
            r = r + 1
        Loop
        Application.ScreenUpdating = True
    End If
    End Sub
    Regards

    SB
    Last edited by singerbatfink; 02-11-2016 at 07:28 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Automatic Outlook mail due date reminder based on Excel file
    By iamitp in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 08-18-2019, 05:51 PM
  2. Need VB script for saving an excel file that appends the start of week date
    By alexgempesaw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-10-2014, 03:04 AM
  3. [SOLVED] Set Outlook reminder from Excel cell date. Office 2013
    By Peterino in forum Excel General
    Replies: 1
    Last Post: 10-22-2014, 05:41 PM
  4. Create Outlook Reminder on Excel and transfered to outlook by macro
    By Benjamin2008 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-21-2013, 03:23 PM
  5. Sheets for every week + start and ending date of the week
    By wimexcel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-30-2012, 01:48 PM
  6. Excel 2007 : Date reminder email to Outlook
    By coughandcath in forum Excel General
    Replies: 2
    Last Post: 02-09-2011, 11:18 AM
  7. week start date and end date based on week number
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-02-2009, 12:39 PM

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