• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Macro to set contact reminder to next day 9:00

witzker

Senior Member
Outlook version
Outlook 2010 32 bit
Email Account
POP3
#1
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
#3
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
#4
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
#5
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
#7
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
#8
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
#10
Hallo again
No coments?
Do you need more Info to help solving the issue?
Did I do something wrong?

Hope for Help
regards
Witzker
 
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#11
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
#12
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
 
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#13
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
#14
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
 
Outlook version
Outlook 2016 32 bit
Email Account
Office 365 Exchange
#17
I’m out of the office for a couple of days and don’t recalll what i tested, only that it worked.