【发布时间】:2018-06-19 23:02:46
【问题描述】:
我为outlook写了一个插件,当我点击按钮时它会弹出约会的LastModificationTime
像这样的按钮事件处理程序
Outlook.ApplicationClass outlook = new Outlook.ApplicationClass();
Outlook.NameSpace ns = outlook.GetNamespace("MAPI");
Outlook.MAPIFolder folder = ns.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderCalendar);
Outlook.Items FolderItems = folder.Items;
DateTime MyDate = DateTime.Now;
List<Outlook.AppointmentItem> Appts = (
from Outlook.AppointmentItem i in folder.Items
where i.Start.Month == MyDate.Month && i.Start.Year == MyDate.Year
select i).ToList();
foreach (Outlook.AppointmentItem Appt in Appts)
{
System.Windows.Forms.MessageBox.Show(Appt.LastModificationTime.ToString());
}
问题是我在手机中更改约会,然后通过交换服务器将其同步到outlook时发生的
产生问题的步骤:
点击按钮,获取LastModificationTime为“time1”
在我的手机中将开始日期更改为“start1”,通过Exchange服务器同步到Outlook
点击按钮,获取LastModificationTime,还是“time1”
在 Outlook 中将开始日期更改为“start2”,但约会仍处于“start1”日期。
重启outlook
点击按钮,获取新的LastModificationTime为“time2”,约会在“start1”日期,“start2”不见了。
没有问题的步骤
- 点击按钮,获取LastModificationTime为“time1”
1.1。重启展望
在我的手机中将开始日期更改为“start1”,通过Exchange服务器同步到Outlook
点击按钮,获取LastModificationTime, "time2"
看起来像 列出应用程序 如果约会通过交换服务器更改,则永远不会刷新到最新值。
这个问题有什么解决办法吗?或其他原因?
【问题讨论】:
标签: c# outlook vsto outlook-addin