English 中文(简体)
如何掌握《展望》任用系列的单一情况
原标题:How to the Outlook Appointment series master from a single occurence

I need to get the master appointment of the meeting series, when an appointment instance is opened.

我尝试了如下(目前的任用变量是任用类型)

DateTime sd = currentAppointment.GetRecurrencePattern().PatternStartDate;
DateTime st = currentAppointment.GetRecurrencePattern().StartTime;

AppointmentItem ai = currentAppointment.GetRecurrencePattern().GetOccurrence(sd+st.TimeOfDay);

However, while this gets me the first appointment in the series, it has a RecurrenceState of olApptOccurrence.

我怎么能够提到“La ApptMaster”——即会议系列?

最佳回答

www.un.org/Depts/DGACM/index_french.htm 项目 用于重复发生的情况和例外情形。

问题回答

我有办法再造一个任命项目,但几乎与修改一个项目一样,告诉我这是否有助于你,如果你需要进一步信息的话。

此处为C#中的代码。

private void CreateNewRecurringAppointment(Outlook._Application OutlookApp) 
{ 
    Outlook.AppointmentItem appItem = null; 
    Outlook.RecurrencePattern pattern = null; 
    try 
    { 
        appItem = OutlookApp.CreateItem(Outlook.OlItemType.olAppointmentItem) 
           as Outlook.AppointmentItem; 
        // create a recurrence 
        pattern = appItem.GetRecurrencePattern(); 
        pattern.RecurrenceType = Outlook.OlRecurrenceType.olRecursWeekly; 
        pattern.StartTime = DateTime.Parse("9:00:00 AM"); 
        pattern.EndTime = DateTime.Parse("10:00:00 AM"); 
        // we can specify the duration instead of using the EndTime property 
        // pattern.Duration = 60; 
        pattern.PatternStartDate = DateTime.Parse("11/11/2011"); 
        pattern.PatternEndDate = DateTime.Parse("12/25/2011"); 
        appItem.Subject = "Meeting with the Boss"; 
        appItem.Save(); 
        appItem.Display(true); 
    } 
    catch (Exception ex) 
    { 
        System.Windows.Forms.MessageBox.Show(ex.Message); 
    } 
    finally 
    { 
        if (pattern != null) 
           System.Runtime.InteropServices.Marshal.ReleaseComObject(pattern); 
        if (appItem != null) 
           System.Runtime.InteropServices.Marshal.ReleaseComObject(appItem); 
    } 
} 

来源:





相关问题
Building a Com addin for Office 2000 / Office 2007

I am struggling to find a straight forward guide to creating office addins using VSTO and VB.net. Specifically I would like to know how to be able to create a addin/ dll which can either be ...

VSTO 3.0 Excel 2007 Addin Tab doesn t display

This is a very odd problem I ve found. I have written and successsfully deployed a VSTO 3.0 Addin for Excel 2007. The problem is that the Tab for the Ribbon only shows up on NEW instances of Excel; ...

VSTO - Outlook 2007 - Display form before send message?

I m new to Outlook add-in programming and not sure if this is possible: I want to display a pop-up form (or selection) and ask for user input at the time they click Send. Basically, whenever they ...

deleting named ranges in VSTO

I have a VSTO spreadsheet, and have re-jigged the front end. I need to change some named ranges to reflect this. Couldn t see a good way of doing this, so I created other named ranges and pointed ...

VSTO remove file without resigning the manifest

I have a file added to my vsto project and I want to remove this file after publishing the project. This is because the file should only be avaliable for some customers, for others we want to remove ...

Is there a future for PowerPoint VBA/VSTO? [closed]

Does anyone know what the future holds for VBA/VSTO programming in PowerPoint? I ve been working on a Office automation project and find it frustrating to work with PowerPoint in particular since it ...

热门标签