Vba 将天数添加到Outlook电子邮件标志截止日期

Vba 将天数添加到Outlook电子邮件标志截止日期,vba,outlook,Vba,Outlook,如何将以下Outlook宏从添加7天到现在的,更改为添加到项目到期日 Dim objMsg As Object ' GetCurrent Item function is at http://slipstick.me/e8mio Set objMsg = GetCurrentItem() With objMsg ' due this week flag .MarkAsTask olMarkThisWeek ' sets a

如何将以下Outlook宏从添加7天到现在的
,更改为添加到项目到期日

    Dim objMsg As Object

   ' GetCurrent Item function is at http://slipstick.me/e8mio
    Set objMsg = GetCurrentItem()
    With objMsg
       ' due this week flag
       .MarkAsTask olMarkThisWeek
       ' sets a specific due date
       .TaskDueDate = Now + 7
       '   .FlagRequest = "Call " & objMsg.SenderName
       .ReminderSet = False
       '   .ReminderTime = Now + 2
       .Save
    End With

    Set objMsg = Nothing
End Sub
请尝试以下功能:-

DateAdd("d", 7, Now)

使用日期+7代替现在+7。
这将使当前日期增加7天。

使用以下选项之一:

.TaskDueDate = .TaskDueDate + 7


从物品到期日算起7天,而不是“现在”,例如,这是为了您的帮助。您可以将任意日期替换为“现在”。从项目到期日算起7天,而不是当前日期。之前已尝试过,但失败。但在你的解决方案被再次检查和评论后,MarkAsTask Olmarkthis week和now正在工作。有趣的
.TaskDueDate = DateAdd("d", 7, .TaskDueDate)