C#WPF如何删除Outlook约会请帮帮我? [英] C# WPF how can I delete outlook appointments please help me?
本文介绍了C#WPF如何删除Outlook约会请帮帮我?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想要预约名称和日期然后它将从outlook中删除
任何人都知道c#WPF的代码请帮助我找不到因为我使用的是Microsoft的代码但我得到了一些错误请帮帮我.....
我发现这段代码
I want to put appointments name and date and then it will delete from outlook
Anybody knows code for c# WPF please help me I couldn't find because I use code from Microsoft but I got some error please help me....
I found this code
Outlook.MAPIFolder calendar =
Application.Session.GetDefaultFolder(
Outlook.OlDefaultFolders.olFolderCalendar);
Outlook.Items calendarItems = calendar.Items;
Outlook.AppointmentItem item =
calendarItems["Test Appointment"] as Outlook.AppointmentItem;
Outlook.RecurrencePattern pattern =
item.GetRecurrencePattern();
Outlook.AppointmentItem itemDelete = pattern.
GetOccurrence(new DateTime(2006, 6, 28, 8, 0, 0));
if (itemDelete != null)
{
itemDelete.Delete();
}
我尝试过:
我尝试了一切但没有工作
What I have tried:
I try everything but nothing worked
Outlook.MAPIFolder calendar =
Application.Session.GetDefaultFolder(
Outlook.OlDefaultFolders.olFolderCalendar);
Outlook.Items calendarItems = calendar.Items;
清理工具和会话提供商错误我该怎么办呢
cleander and session giver error what can I d do for it
推荐答案
Google是你的朋友:好好经常拜访他。他可以比在这里发布问题更快地回答问题...
非常快速的搜索给出了83,000次点击:删除Outlook约会c - Google搜索 [ ^ ]
MSDN有解决方案: AppointmentItem方法(Microsoft.Office.Interop.Outlook) [ ^ ]
_ AppointmentItem.Delete方法(Microsoft.Office.Interop.Outlook) [ ^ ]
Google is your friend: Be nice and visit him often. He can answer questions a lot more quickly than posting them here...
A very quick search gave 83,000 hits: delete outlook appointments c - Google Search[^]
And MSDN has the solution: AppointmentItem Methods (Microsoft.Office.Interop.Outlook)[^]
_AppointmentItem.Delete Method (Microsoft.Office.Interop.Outlook)[^]
这篇关于C#WPF如何删除Outlook约会请帮帮我?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文