Macro to set contact reminder to next day 9:00

Status
Not open for further replies.
they should still be red if over due - but you might need to create a custom view that uses conditional formatting.
 
Thx I will try

Pls can you help me setting
ReminderTime 90 minuter from actual time?
 
Thx I will try

Pls can you help me setting
ReminderTime 90 minuter from actual time?
As in 90 min from now or 90 min before due? Either is possible...

90 from now...
.ReminderTime = Now() + 90 / 1440

Tasks don't have a due time, only a due date, so this ends up being 1:30 AM. :( It would work with reminders on appointments.
.ReminderTime = .DueDate + 90 / 1440
 
THX
works great.

To get the macro "tomorrow 09.00 a.m." more comfortable for using it on Fridays
(when I click on tomorrow 09.00 on Friday it will remind me on Saturday where I cannot call)

How can I modify the macro when I use it on Friday or Saturday, that it will set reminder time to next Monday 09.00 a.m..

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
    .MarkAsTask olMarkComplete
' 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

Many thanks for your further help

Witzker
 
it will read something like this - i think the bolded part is correct but did not test it.
if format (date,"dddd") = "Friday" then
.ReminderTime = Date + 3 + #9:00:00 AM#
else
.ReminderTime = Date + 1 + #9:00:00 AM#

end if
 
THX
I think I did something wrong
I get SYNTAX error

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
    .MarkAsTask olMarkComplete
' sets a specific due date
    '.TaskDueDate = Now + 3
    '.FlagRequest = "Nachverfolgung"
    .ReminderSet = True
 
If format(date,"dddd") = "Friday" then
.ReminderTime = Date + 3 + #9:00:00 AM#
else
.ReminderTime = Date + 1 + #9:00:00 AM#
End If

.Save
End With

Set objMsg = Nothing
End Sub
 
It's working here. You probably don't want this line as it sets it to complete, but that isn't callusing an error:
.MarkAsTask olMarkComplete

Are any lines shown in red? Does it say which line has the error?

The date format is working...
2018-05-25_11-00-23.png
 
Hi
This line is red
If format(date,"dddd") = "Friday" then

Its a german Outlook mayby I have say Freitag instead of Friday?
 
Its a german Outlook mayby I have say Freitag instead of Friday?
yes, try changing that - the dddd part should be the same in any language.
 
Hi again

Back to another problem.

You wrote:
It's working here. You probably don't want this line as it sets it to complete, but that isn't callusing an error:
.MarkAsTask olMarkComplete


You are right, I do not want to have it marked as complete, so I removed this line.

Code below

When I now run the macro without the line on a contact, where reminder was set before and the date is due (red in the view) it updates reminder time but still stays red in the view, although the reminder date is in the future.

When I open a contact where reminder was set before and the date is due (red in the view) and I delete the reminder as seen below
1528295394836.png


and afterwards run the macro, contact is correct NOT red with updated reminder in the future.

To save this step I think I should put the code for "deleting reminder (Kennzeichnung löschen" in the macro before setting the new reminder time.

I hope you can help me to get it finally running.

Thanks
Code:
Public Sub HeuteTest()
Dim objMsg As Object
' GetCurrent Item function is athttp://slipstick.me/e8mio
Set objMsg = GetCurrentItem()
With objMsg
' due this week flag
    .MarkAsTask olMarkNoDate
    '.MarkAsTask olMarkComplete
    ' sets a specific due date
     '.TaskDueDate = Date + #12:31:00 PM#
     '.FlagRequest = "Nachverfolgung"
    
    ' makes sure due date is none
    .TaskDueDate = #1/1/4501#
              
    .ReminderSet = True
    .ReminderTime = Now() + 2 / 1440
    
     .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
 
Yeah, definitely try setting the reminder to none first- but you'll probably need to add a .save right after, so it "takes".
 
tried This
Public Sub HeuteTest()
Dim objMsg As Object
' GetCurrent Item function is athttp://slipstick.me/e8mio
Set objMsg = GetCurrentItem()
With objMsg
' due this week flag
.MarkAsTask olMarkNoDate
'.MarkAsTask olMarkComplete
' sets a specific due date
'.TaskDueDate = Date + #12:31:00 PM#
'.FlagRequest = "Nachverfolgung"

' makes sure due date is none
.TaskDueDate = #1/1/4501#

.ReminderSet = none ' added no result!
.Save

.ReminderSet = True
.ReminderTime = Now() + 2 / 1440

.Save
End With

Set objMsg = Nothing
End Sub

still red
can you pls tell me how to set reminder to none
THX
 
Oh... my bad - i was thinking this set it to none:
' makes sure due date is none
.TaskDueDate = #1/1/4501#

Try this - I'm not sure if both are needed. (Will test it next)
.ReminderTime = #1/1/4501#
.ReminderSet = False
.Save
 
This seems to work - i didn't have a lot of contacts to test it on though.
Code:
.ReminderTime = #1/1/4501#
.ReminderSet = False
.Save
 
THX but sorry
Still RED

Public Sub HeuteTest()
Dim objMsg As Object
' GetCurrent Item function is athttp://slipstick.me/e8mio
Set objMsg = GetCurrentItem()
With objMsg
' due this week flag
.MarkAsTask olMarkNoDate
'.MarkAsTask olMarkComplete
' sets a specific due date
'.TaskDueDate = Date + #12:31:00 PM#
'.FlagRequest = "Nachverfolgung"

' makes sure due date is none
.TaskDueDate = #1/1/4501#

'Try this - I 'm not sure if both are needed. (Will test it next)
.ReminderTime = #1/1/4501#
.ReminderSet = False
.Save ' still RED !
' setting correct reminder
.ReminderSet = True
.ReminderTime = Now() + 2 / 1440

.Save
End With

Set objMsg = Nothing
End Sub
 
There is a Library "IMContact" in OL ist this helpful?
I have no idea what that is... oh - smart tags (based on the file path). I don't think its used anymore.

The code sample from VBOffice won't work in modern versions of Outlook - it uses CDO to set the flags. Modern versions don't use CDO.
 
OK THX
How to go on the contact is still red in the code above?
Hope for help
 
try setting a due date in the future when you remove the reminder, then set it to none when you add the reminder.
 
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
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 1
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
Geldner Send / Receive a particular group via macro or single keypress Using Outlook 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
L Macro to add Date & Time etc to "drag to save" e-mails Outlook VBA and Custom Forms 17
S Macro for Loop through outlook unread emails Outlook VBA and Custom Forms 2
Globalforester ItemAdd Macro - multiple emails Outlook VBA and Custom Forms 3
S Macro to extract email addresses of recipients in current drafted email and put into clipboard Outlook VBA and Custom Forms 2

Similar threads

Back
Top