Macro to set contact reminder to next day 9:00

Status
Not open for further replies.

Witzker

Senior Member
OS Version(s)
  1. iOS
Outlook version
Outlook 2019 32-bit
Email Account
Exchange Server 2007
Hi
When contact is opened i would like to have a button in the ribbon when pressing reminder to call contact should be set to next day 9:00
The fields for beginn etc schould not be used only reminder time should be set
Can you pls propose code to do this
Many THX
Regards Witzker
 
The macro at How to set a flag to follow up using VBA should get you close. You'll need to remove flag request, mark as task, and due date lines
use .ReminderTime = Date + 1 + #9:00:00 AM# for the time.
 
What i have now in modul 2 is
Public Sub Morgen()

Dim objMsg As Object

' GetCurrent Item function is athttp://slipstick.me/e8mio
Set objMsg = GetCurrentItem()

With objMsg

' due this week flag
'.MarkAsTask olMarkThisWeek
' 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

The time is set correctly but if the contact was not flaged before there is no flag
so I dont kow how to set flag Nachverfolgung (follow Up)?
There schould be no Beginn and end Date

can you help me pls
regards Witzker
 
Code:
Dim objMsg As Object

' GetCurrent Item function is athttp://slipstick.me/e8mio
Set objMsg = GetCurrentItem()

With objMsg

' due this week flag
'.MarkAsTask olMarkThisWeek
' 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 now have a Macro that should set reminder time in opened custom contact form to next day 9:00
There should no beginning and due date simply the reminder date.

Code:
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

1522338398158.png


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 delete the reminder before setting the new one
How can I archive this?

THX for help
Regards Witzker
PS: How can I delete my 2 poste before this?
 
Last edited:
Not even one Idea?
Help Pls..
 
Sorry, i've been working. :)
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 delete the reminder before setting the new one
i'm not sure what you mean by this? The macro should change/replace the reminder.
 
Thx for takin care

When I open a kontakt and set remindertime
No startdate
No duedate
Just reminder Date and Time

1522994332214.png


In The View the item gets red when remeindertime is in the past (expired)

When i use the macro to set the remindertime

In The View the item does NOT get red when remeindertime is in the past (expired)

1522994102174.png


I think there should be something else to be set in the macro to achieve
the Item getting red in the view when remeindertime is in the past (expired)

I Hope you can help

Regards
Witzker
 
Hallo again
No coments?
Do you need more Info to help solving the issue?
Did I do something wrong?

Hope for Help
regards
Witzker
 
Sorry, I've been sick - damn spring colds - and haven't had a change to look at it.

I'm not sure if its just something with my setup or if this is actually working... sometimes i need to mark as something else then change it, other times i only need to set the date as none.
Code:
With objMsg
' due this week flag
    .MarkAsTask olMarkNextWeek
    .Save
    .MarkAsTask olMarkNoDate
' makes sure due date is none
    .TaskDueDate = #1/1/4501#
    '.FlagRequest = "Nachverfolgung"
    .ReminderSet = True
    .ReminderTime = Date + 2 + #9:00:00 AM#
    .Save
End With
 
Thx for answer

when i use this code and reminder was set before the contact still is red in the view

i tried to set
.FlagRequest = "Call "
now i get an error in this line
there must be something that outlook sets to mark the contact red when in the past

maybe its why it is marked as TASK ist there another marking for contacts??

Code:
Public Sub Heute14()
Dim objMsg As Object
' GetCurrent Item function is athttp://slipstick.me/e8mio
Set objMsg = GetCurrentItem()

With objMsg
' due this week flag
    .MarkAsTask olMarkNextWeek
    .Save
    .MarkAsTask olMarkNoDate
' makes sure due date is none
    .TaskDueDate = #1/1/4501#
    .FlagRequest = "Call "
    .ReminderSet = True
    .ReminderTime = Date + #10:30: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

hope for help
Witzker
Hope you are well again
 
I'll test it with contacts - i was testing it yesterday with flagged messages. It should be the same for anything except Tasks... i know there are some differences in what a task and a flagged item support but i need some coffee to wake my brain up. :)

i looked for a property that would account for the red sticking, thats when i came up with changing a value and saving.
 
I'll test it with contacts - i was testing it yesterday with flagged messages. It should be the same for anything except Tasks... i know there are some differences in what a task and a flagged item support but i need some coffee to wake my brain up. :)

i looked for a property that would account for the red sticking, thats when i came up with changing a value and saving.
Sorry i do not understand what to change in code
Pls be so kind and let me have the new code
 
Hi again
Any news?
 
Hi
Do you have any news please.
Regards
Witzker
 
Thx
Good news
Pls post working code when you are back
Regards
Witzker
 
Ok THX
Does that mean there is no way to get the reminders in red when date is in the past?
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
4 Macro to set the category of Deleted Item? Outlook VBA and Custom Forms 2
R Macro to copy email to excel - Runtime Error 91 Object Variable Not Set Outlook VBA and Custom Forms 11
Q How do I set up macro for adobe Outlook VBA and Custom Forms 1
N Macro in this Project are disabled Outlook VBA and Custom Forms 2
M Outlook 365 Amending code so macro runs within current new mail window Outlook VBA and Custom Forms 0
M Outlook 365 macro - automatically attach file based on subject line Outlook VBA and Custom Forms 0
J Outlook macro to run before email is being send Outlook VBA and Custom Forms 3
H Macro to Delete Duplicate items in Outlook calendar where title is the same and date is the same Outlook VBA and Custom Forms 0
X Custom icon (not from Office 365) for a macro in Outlook Outlook VBA and Custom Forms 1
X Run macro automatically when a mail appears in the sent folder Using Outlook 5
mrrobski68 Issue with Find messages in a conversation macro Outlook VBA and Custom Forms 1
G Creating Macro to scrape emails from calendar invite body Outlook VBA and Custom Forms 6
M Use Macro to change account settings Outlook VBA and Custom Forms 0
J Macro to Reply to Emails w/ Template Outlook VBA and Custom Forms 3
C Outlook - Macro to block senders domain - Macro Fix Outlook VBA and Custom Forms 1
Witzker Outlook 2019 Macro to seach in all contact Folders for marked Email Adress Outlook VBA and Custom Forms 0
S macro error 4605 Outlook VBA and Custom Forms 0
A Macro Mail Alert Using Outlook 4
J Outlook 365 Outlook Macro to Sort emails by column "Received" to view the latest email received Outlook VBA and Custom Forms 0
J Macro to send email as alias Outlook VBA and Custom Forms 0
M Outlook Macro to save as Email with a file name format : Date_Timestamp_Sender initial_Email subject Outlook VBA and Custom Forms 0
Witzker Outlook 2019 Macro GoTo user defined search folder Outlook VBA and Custom Forms 6
D Outlook 2016 Creating an outlook Macro to select and approve Outlook VBA and Custom Forms 0
Witzker Outlook 2019 Macro to send an Email Template from User Defined Contact Form Outlook VBA and Custom Forms 0
Witzker Outlook 2019 Macro to check Cursor & Focus position Outlook VBA and Custom Forms 8
V Macro to mark email with a Category Outlook VBA and Custom Forms 4
M Outlook 2019 Macro not working Outlook VBA and Custom Forms 0
S Outlook 365 Help me create a Macro to make some received emails into tasks? Outlook VBA and Custom Forms 1
D Auto Remove [EXTERNAL] from subject - Issue with Macro Using Outlook 21
V Macro to count flagged messages? Using Outlook 2
sophievldn Looking for a macro that moves completed items from subfolders to other subfolder Outlook VBA and Custom Forms 7
S Outlook Macro for [Date][Subject] Using Outlook 1
E Outlook - Macro - send list of Tasks which are not finished Outlook VBA and Custom Forms 3
E Macro to block senders domain Outlook VBA and Custom Forms 1
D VBA Macro to Print and Save email to network location Outlook VBA and Custom Forms 1
N VBA Macro To Save Emails Outlook VBA and Custom Forms 1
N Line to move origEmail to subfolder within a reply macro Outlook VBA and Custom Forms 0
Witzker Outlook 2019 Macro to answer a mail with attachments Outlook VBA and Custom Forms 2
A Outlook 2016 Macro to Reply, ReplyAll, or Forward(but with composing new email) Outlook VBA and Custom Forms 0
J Macro to Insert a Calendar Outlook VBA and Custom Forms 8
W Macro to Filter Based on Latest Email Outlook VBA and Custom Forms 6
T Macro to move reply and original message to folder Outlook VBA and Custom Forms 6
D Autosort macro for items in a view Outlook VBA and Custom Forms 2
S HTML to Plain Text Macro - Help Outlook VBA and Custom Forms 1
A Macro to file emails into subfolder based on subject line Outlook VBA and Custom Forms 1
N Help creating a VBA macro with conditional formatting to change the font color of all external emails to red Outlook VBA and Custom Forms 5
S Visual indicator of a certain property or to show a macro toggle Outlook VBA and Custom Forms 2
L Modifying VBA script to delay running macro Outlook VBA and Custom Forms 3
S Macro to extract and modify links from emails Outlook VBA and Custom Forms 3
M Replyall macro with template and auto insert receptens Outlook VBA and Custom Forms 1

Similar threads

Back
Top