Macro to set Reminder on a Contact tomorro 9:00

Outlook Discussion in 'Microsoft Office' started by Witzker, Mar 29, 2018.

  1. Witzker

    Witzker

    Joined:
    Mar 29, 2018
    Likes Received:
    0
    I have a Macro that should set reminder time in opened custom contact form to next day 09:00
    There should be no beginning and due date simply the reminder date.( see Attatched Picture)

    -----------------------------
    Public Sub Morgen09()
    Dim objMsg As Object
    ' GetCurrent Item function is athttp://slipstick.me/e8mio
    Set objMsg = GetCurrentItem()
    With objMsg
    ' due this week flag
    .MarkAsTask olMarkNoDate
    ' sets a specific due date
    '.TaskDueDate = Now + 3
    '.FlagRequest = "Nachverfolgung"
    .ReminderSet = True
    .ReminderTime = Date + 1 + #9:00:00 AM#
    .Save
    End With
    Set objMsg = Nothing
    End Sub
    ----------------------------------
    Function GetCurrentItem() As Object
    Dim objApp As Outlook.Application
    Set objApp = Application
    On Error Resume Next
    Select Case TypeName(objApp.ActiveWindow)
    Case "Explorer"
    Set GetCurrentItem = objApp.ActiveExplorer.Selection.Item(1)
    Case "Inspector"
    Set GetCurrentItem = objApp.ActiveInspector.CurrentItem
    End Select
    Set objApp = Nothing
    End Function
    -------------------------------------------------

    I noticed that if there was a reminder set bevor and I click on the macro the contact stays marked red in the view
    I think in the macro should be a line to clear(delete) the reminder before setting the new reminder for tomorrow 9:00
    How can I archive this?

    THX for help
    Regards Witzker
     

    Attached Files:

    Witzker, Mar 29, 2018
    #1
    1. Advertisements

  2. Witzker

    Witzker

    Joined:
    Mar 29, 2018
    Likes Received:
    0
    Help Pls..
    Not even one Idea?
     
    Witzker, Apr 3, 2018
    #2
    1. Advertisements

  3. Witzker

    JohnBgoode

    Joined:
    Jul 7, 2018
    Likes Received:
    1
    Not sure if it the reminder is the problem but you can try this.
    It will not make a difference if you set the reminder to false first. Only when you save the item with reminderset =false the item will be updated.
    test something like
    if .reminderset = true then
    .reminderset=false
    .save
    msgbox "click macro again"
    end if
    so it sets it to false and tells you to click the macro again
     
    JohnBgoode, Jul 7, 2018
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.