简体   繁体   English

无法以编程方式在C#中的Outlook 2016工作项上设置跟进

[英]Can't programmatically set follow up on Outlook 2016 taskitem in C#

In Outlook 2016 (and I assume previous versions) you are able to right-click a task and select Follow-up, and then choose when you'd like to have the item followed up. 在Outlook 2016(我假设使用的是以前的版本)中,您可以右键单击任务,然后选择“跟进”,然后选择何时对项目进行跟进。

I am trying to do the same thing programmatically in an Outlook Addin using VSTO in Visual Studio 2015. 我试图在Visual Studio 2015中使用VSTO在Outlook Addin中以编程方式执行相同的操作。

I can see in the link below that you can use the method MarkAsTask on several item types (for instance, mailitem) but the method doesn't exist for TaskItems. 我可以在下面的链接中看到,可以在几种项目类型(例如mailitem)上使用MarkAsTask方法,但是TaskItems不存在该方法。

So how can I programmatically emulate the behaviour that exists in the Outlook client? 那么,如何才能以编程方式模拟Outlook客户端中存在的行为?

https://msdn.microsoft.com/VBA/Outlook-VBA/articles/mailitem-markastask-method-outlook https://msdn.microsoft.com/VBA/Outlook-VBA/articles/mailitem-markastask-method-outlook


Edit: We've already tried simply changing the start/end date on the task, and it doesn't have the same effect as clicking Follow Up in Outlook. 编辑:我们已经尝试过简单地更改任务的开始/结束日期,并且其效果与在Outlook中单击“跟进”相同。 Perhaps some history would be good here, to explain what we are actually trying to achieve. 也许有一些历史可以很好地解释我们实际上正在努力实现的目标。

We set up a SharePoint Task List to hold a list of tasks we're all working on that other users can see. 我们设置了SharePoint任务列表,以保存所有其他用户可以看到的正在处理的任务列表。 This works great, but the ultimate aim was to have this show in the To-Do-Bar as a type of "dashboard". 效果很好,但最终目的是将此节目作为一种“仪表盘”显示在待办事项栏中。 Unfortunately, we soon realised tasks assigned to other users don't appear in the To-Do-Bar. 不幸的是,我们很快意识到分配给其他用户的任务不会出现在待办事项栏中。

But I since accidentally discovered, if you click a task assigned to another user, and click "Follow-up" and choose No Date (or any date range), it WILL in fact appear in the To-Do-Bar. 但是,我从无意中发现,如果您单击分配给另一个用户的任务,然后单击“跟进”并选择“无日期”(或任何日期范围),它实际上会出现在“待办事项栏”中。 But of course we don't want to have to do this constantly for tasks to appear in the To-Do-Bar, so I thought I'd write a tiny add-in to regularly do this programmatically. 但是,当然,我们不想为了使任务出现在待办事项栏中而不断地这样做,所以我想我会写一个很小的插件来定期以编程方式执行此操作。 But I cannot seem to emulate this unintended effect of clicking "Follow-up" in the Outlook client with VSTO. 但是我似乎无法模仿在VSTO的Outlook客户端中单击“跟进”的意外效果。

Clicking "Follow up" ion a task simply changes the Due Date and Start Date. 单击“跟进”任务仅更改“到期日期”和“开始日期”。 You can see the changes in OutlookSpy (click IMessage button to see all available properties). 您可以在OutlookSpy中看到更改(单击IMessage按钮以查看所有可用属性)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM