Macro to set contact reminder to next day 9:00

Status
Not open for further replies.

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
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
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
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
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
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
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
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:

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
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
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
Hallo again
No coments?
Do you need more Info to help solving the issue?
Did I do something wrong?

Hope for Help
regards
Witzker
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
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
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
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.
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
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
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
Hi
Do you have any news please.
Regards
Witzker
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
I’m out of the office for a couple of days and don’t recalll what i tested, only that it worked.
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
Thx
Good news
Pls post working code when you are back
Regards
Witzker
 

Diane Poremsky

Senior Member
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
Sorry for taking so long to get back to you - the problem is the .flagrequest - its not supported in contacts.
 

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
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.
Thread starter Similar threads 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
U Macro for reminders,tasks,calendar Outlook VBA and Custom Forms 4
V macro runs slower on startup than after Outlook VBA and Custom Forms 3
N Macro to move all recipients to CC while replying Outlook VBA and Custom Forms 0
A VBA macro for 15 second loop in send and received just for 1 specific mailbox Outlook VBA and Custom Forms 1
G VBA Macro Calendar Printing Assistant 3
R Help Revising VBA macro to delete email over different time span Outlook VBA and Custom Forms 0
M Outlook macro to automate search and forward process Outlook VBA and Custom Forms 6
R Macro Schedule every day in Outlook Using Outlook 0
L Moving emails with similar subject and find the timings between the emails using outlook VBA macro Outlook VBA and Custom Forms 1
Healy Consultants Macro to remove inside organization distribution list email address when reply to all recepients Outlook VBA and Custom Forms 0
geofferyh Cannot get Macro to SAVE more than one message attachment??? Outlook VBA and Custom Forms 5
N How can I increase/faster outlook VBA Macro Speed ? Using Outlook 2
D.Moore Folder view settings by VBA macro Outlook VBA and Custom Forms 57
A Outlook macro to create search folder with mail categories as criteria Outlook VBA and Custom Forms 3
Dave A Run macro on existing appointment when it changes Outlook VBA and Custom Forms 1
V Outlook Macro to show Flagged messages Outlook VBA and Custom Forms 2
O Run macro automatically at sending an email Using Outlook 11
R Retain Original Message When Forwarding With Macro Outlook VBA and Custom Forms 3
C Macro to add multiple recipients to message Outlook VBA and Custom Forms 3
B Reply and replyall macro is not working Outlook VBA and Custom Forms 1
O Macro - paste as plain text Outlook VBA and Custom Forms 2
J Help Please!!! Outlook 2016 - VBA Macro for replying with attachment in meeting invite Outlook VBA and Custom Forms 9
M Adding Macro to populate "to" "subject" "body" not deleting email string below. Outlook VBA and Custom Forms 5
E Copying data from e-mail attachement to EXCEL file via macro Outlook VBA and Custom Forms 38
M Macro to add date/time stamp to subject Outlook VBA and Custom Forms 4
R VBA macro - new message Outlook VBA and Custom Forms 3
S Example VBA Macro - To Conditionally Change the From Account and Add a BCC Address on Emails Outlook VBA and Custom Forms 11
S Macro using .SendUsingAccount only works the first time, after starting Outlook Outlook VBA and Custom Forms 4
S VBA Macro - Run-time error '424': object required - Help Please Outlook VBA and Custom Forms 3
B VBA Macro for assigning multiple Categories to an email in my Inbox Outlook VBA and Custom Forms 1
N Macro for attachment saved and combine Outlook VBA and Custom Forms 1
Sabastian Samuel HOW DO I FORWARD AN EMAIL WITH MACRO using an email that in the body of another email Outlook VBA and Custom Forms 3
C Search with Google Macro? Outlook VBA and Custom Forms 4
J Outlook 2013 Extract Flag Completed dates to Excel Macro Outlook VBA and Custom Forms 16
M Slow VBA macro in Outlook Outlook VBA and Custom Forms 5
D Print Attachments only in selected emails using a macro Outlook VBA and Custom Forms 3
M Macro for attachments download adjustment Outlook VBA and Custom Forms 3
M VBA macro for Inbox's attachments search Outlook VBA and Custom Forms 0
B Macro to manually move selected emails to network folder Outlook VBA and Custom Forms 1
A Forward Outlook Email by Filtering using Macro Rule Outlook VBA and Custom Forms 44
I Dialog called up multiple times when saving emails from macro Outlook VBA and Custom Forms 2
Y VBA Macro to highlight some Keyword in mail body? Outlook VBA and Custom Forms 3
Tanja Östrand Outlook 2016 - Create Macro button to add text in Subject Outlook VBA and Custom Forms 1
D Outlook macro with today's date in subject and paste clipboard in body Outlook VBA and Custom Forms 1
nathandavies Email Details to Excel & Save as .MSG on one macro - combination of 2 macros Outlook VBA and Custom Forms 3
C Outlook Subject Line Macro Outlook VBA and Custom Forms 0
B Automation error running VB macro code Outlook VBA and Custom Forms 8
Similar threads


















































Top