VBA:标志msg w /默认时间但没有开始&结束日期和今天提醒设定时间(我们默认时间会做什么)? [英] VBA: Flag msg w/default time but NO start & end dates & reminder for today with set time (and what would we do for default time)?

查看:81
本文介绍了VBA:标志msg w /默认时间但没有开始&结束日期和今天提醒设定时间(我们默认时间会做什么)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某种原因,不得不重新创建我的帐户,可以这么说,当我从来没有得到解决方案但从那时起我一直在努力的时候,我无法回复我自己的消息。最终在大多数时间手动完成。 所以请求该集团的
放纵重新发布同样的问题,因为它从未解决。

For some reason, had to re-create my account, so to speak and I couldn't reply to my own message from way back when that never got a resolution but that I've struggled with since then, ending up doing it manually most of the time.  So begging the group's indulgence in re-posting the same question as it was never resolved.

正如我在2014年的原始信息中所提到的,我需要能够设置通过vba提醒标志,但条件是我没有找到答案,尽管其他人提出了相同或非常相似的问题。 我们似乎都没有解决过
这个,所以希望这次不同。 这很难描述,所以如果这里的任何人都很善良,如果你打开一封电子邮件,然后再打开自定义标志对话框,这可能是查看问题的最简单方法。 即,这个标志问题的
答案中的一个涉及某人善意但错误地给出约会解决方案,这不是关于约会但是关于提醒自定义标志,我们可以设置为电子邮件消息,以便我们可以确保对于上述电子邮件,我们会按照
a的某段时间执行某项操作。 谢谢!

As I mentioned in my original message in 2014, I needed to be able to set a reminder flag via vba but with conditions that I've not found an answer for though others have asked the same or very similar question.  None of us seem to have ever resolved this, so hoping this time it's different.  It's hard to describe, so if anyone here would be so kind, if you open an email message and then open the custom flag dialogue box first, that might be the easiest way to see the problem.  i.e., one of the answers to this flag question involved someone kindly but erroneously giving an appointment solution when this is not about an appointment but about a reminder custom flag, that we can set to email messages so that we can make sure we do a certain action by a certain time for said email.  Thanks!

在自定义标记对话框中有5个字段:

In the custom flag dialogue box there are 5 fields:

1. 举报人:  - 这是消息,即默认值为FOLLOW UP

1.  Flag to:  - this is the message, i.e., the default is FOLLOW UP

2. 开始日期: - 我_never_需要一个日期。 这使事情变得复杂。 这是一个提示标记,不是跟踪开始和截止日期的事情。

2.  Start Date: - I _never_ need a date here.  It complicates things.  This is a reminder flag, not something for me to track start and due dates.

3. 截止日期: - 如上所述,总是设置为NONE。

3.  Due Date: - as explained above, this is always set to NONE.

4。提醒:  - 日期

4. Reminder:  - DATE

5。提醒: - TIME

5. Reminder: - TIME

所以vba应该给出:

1。标记消息,保持原样或自定义消息。

1. Flag message, either leave as is or a custom message.

2。开始日期:  BLANK

2. Start Date:  BLANK

3。截止日期:  BLANK

3. Due Date:  BLANK

4。提醒(日期): 今天的日期

4. Reminder (date):  Today's date

5。提醒(时间):  16:25

5. Reminder (time):  16:25

6. 对话框应该保持打开状态。

6.  And the dialogue box should remain open.

我没有解决这个问题,但我已经达到了上述部分程度 - 1.标记消息,好的。  2.开始日期为空白。 5.提醒时间是下午4点25分。

I've not resolved this but I have achieved the above partially to this degree - 1. flag message, okay.  2. Start date is blank. 5. Reminder time is 4:25 p.m.

其余的我没有管理。 我需要修理:

The rest I haven't managed.  I need to fix:

3. 由于 日期: 空白

3.  Due Date:  Blank

4。提醒日期 - 今天的日期。

4. Reminder date - today's date.

6。对话框仍然开放。

6. Dialogue box remains open.

我从很多帖子拼凑起来的是:

What I have cobbled together from a great number of posts is this:

'========================================================================================================
Public Sub FLAG_Message_CUSTOM()

Dim objMsg As Object

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

With objMsg

'-------------------------------
' START DATE field?
    .MarkAsTask olMarkNoDate
'-------------------------------
'  DUE DATE field:
    .TaskDueDate = Now()   'what is syntax for no date like above .MarkAsTask's NO DATE.  Nothing here worked!
'-------------------------------
'    .FlagRequest = "Follow up at Day's End"
'    .FlagRequest = "Email from: " & objMsg.SenderName
    .FlagRequest = "Task:"     ' flag message goes here, i.e., "Follow up"
    .ReminderSet = True
    .ReminderOverrideDefault = True
    .ReminderTime = " 16:25:00 PM"
    .ReminderSet = True
'    .Save
End With

Set objMsg = Nothing
End Sub
'========================================================================================================
' 170525.Th, 15h45:  https://www.slipstick.com/developer/outlook-vba-work-with-open-item-or-select-item/
'                    GetCurrentItem - called from above FLAG macro.
'========================================================================================================
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
'======================================================================================================

如果某种灵魂可以帮助解决我无法弄清楚的3个项目(将DUE DATE设为空白,请将提醒日期设为今天,并保留自定义标志对话框OPEN),这将是盛大的,并最终将这个3岁的问题搁置!

If some kind soul could help with the 3 items that I haven't been able to figure out (make DUE DATE blank, set reminder DATE to today, and leave the custom flag dialogue box OPEN), that would be grand and would finally put this 3-year old problem to rest!

谢谢!

推荐答案

你好,

>> 3. 由于 日期: 空白

>>3.  Due Date:  Blank

如果您想让开始日期和截止日期保持空白, 我们必须 使用 

If you want to let Start Date and Due Date keep blank,  we must use 

 .MarkAsTask olMarkNoDate

你可以制作它们从Outlook UI手动空白,然后您可以找到Outlook将其标记为无日期。

You could make them blank manually from Outlook UI, then you could find Outlook flags it as No Date.

>> 4。提醒日期 - 今天的日期。

>>4. Reminder date - today's date.

请使用

    .ReminderTime = Date & " 16:25:00 PM"

" Date"将返回今天的日期

"Date" would return today's date

>> 6。对话框保持打开状态。

>>6. Dialogue box remains open.

我们可以使用
CommandBars.ExecuteMso方法
显示对话框

We could use CommandBars.ExecuteMso Method to show the dialog

  Select Case TypeName(Application.ActiveWindow)
        Case "Explorer"
            ActiveExplorer.CommandBars.ExecuteMso ("AddReminder")
        Case "Inspector"
            ActiveInspector.CommandBars.ExecuteMso ("AddReminder")
    End Select

问候,

Celeste


这篇关于VBA:标志msg w /默认时间但没有开始&结束日期和今天提醒设定时间(我们默认时间会做什么)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆