Creating recurrence appointment

Status
Not open for further replies.
H

hemaneelagiri

Hi

i want to create outlook(2003) recurring appointments through .net c# windows

for that i am using below code and my question is in between ***** please

go below code and help me

private void fnSetReccurrentPattern()

{

Microsoft.Office.Interop.Outlook.AppointmentItem oAppointment = (Microsoft.

Office.Interop.Outlook.AppointmentItem)

OutApp.CreateItem(Microsoft.Office.Interop.Outlook.

OlItemType.olAppointmentItem);

Microsoft.Office.Interop.Outlook.RecurrencePattern recurrencePattern =

oAppointment.GetRecurrencePattern();

dsRecurrence = fnGetAppOccurrenceDetails(iOccurrSeriesId);

DataRow dtrow = dsRecurrence.Tables[0].Rows[0];

if (int.Parse(dtrow["OccurrType"].ToString()) == 0)

{

recurrencePattern.RecurrenceType=Microsoft.Office.Interop.Outlook.

OlRecurrenceType.olRecursDaily;

*******

how to set the "DailyRecurrenceMode" i mean is it evry day or week day

******

recurrencePattern.Interval = int.Parse(dtrow["OccurrEvery"].ToString());

}

else if (int.Parse(dtrow["OccurrType"].ToString()) == 1)

{// it is fine

recurrencePattern.RecurrenceType = Microsoft.Office.Interop.Outlook.

OlRecurrenceType.olRecursWeekly;

recurrencePattern.Interval = int.Parse(dtrow["OccurrEvery"].ToString());

recurrencePattern.DayOfWeekMask = GetSelectedWeekDays(dtrow);

}

else if (int.Parse(dtrow["OccurrType"].ToString()) == 2)

{

if (int.Parse(dtrow["OccurrPaternType"].ToString()) == 0)

{ // it is fine

recurrencePattern.RecurrenceType = Microsoft.Office.Interop.Outlook.

OlRecurrenceType.olRecursMonthly;

recurrencePattern.DayOfMonth = int.Parse(dtrow["OccurrEvery"].ToString());

recurrencePattern.Interval = int.Parse(dtrow["SpecificDay"].ToString());

}

else if (int.Parse(dtrow["OccurrPaternType"].ToString()) == 1)

{

recurrencePattern.RecurrenceType = Microsoft.Office.Interop.Outlook.

OlRecurrenceType.olRecursMonthNth;

*****************

here how to set "OccurrenceInMonth " means "first/second/third/forth/last"

drop down value

And

Day of week(weekday dropdown) i can use "recurrencePattern.DayOfWeekMask" but

in that only week days r there how can i set "Day/weekday/weekend day"

***************************

}

and last how can i check "End after" / "End by" buttons, there is only "no

enddate " option

pelase help me

recurrencePattern.Interval = int.Parse(dtrow["PatternMonth"].ToString());

}

}

}


200910
 
K

Ken Slovak - [MVP - Outlook]

Open the Object Browser in the Outlook VBA project and select

RecurrencePattern and then press F1. There are explanations and sample code

in VBA about various different patterns and how to set them.

"hemaneelagiri " <u54138@uwe> wrote in message

news:9d5450dd1b79d@uwe...
> Hi
> i want to create outlook(2003) recurring appointments through .net c#
> windows

> for that i am using below code and my question is in between *****
> please
> go below code and help me

> private void fnSetReccurrentPattern()
> {

> Microsoft.Office.Interop.Outlook.AppointmentItem oAppointment =
> (Microsoft.
> Office.Interop.Outlook.AppointmentItem)
> OutApp.CreateItem(Microsoft.Office.Interop.Outlook.
> OlItemType.olAppointmentItem);

> Microsoft.Office.Interop.Outlook.RecurrencePattern recurrencePattern =
> oAppointment.GetRecurrencePattern();

> dsRecurrence = fnGetAppOccurrenceDetails(iOccurrSeriesId);

> DataRow dtrow = dsRecurrence.Tables[0].Rows[0];
> if (int.Parse(dtrow["OccurrType"].ToString()) == 0)
> {
> recurrencePattern.RecurrenceType=Microsoft.Office.Interop.Outlook.
> OlRecurrenceType.olRecursDaily;
> *******
> how to set the "DailyRecurrenceMode" i mean is it evry day or week day
> ******
> recurrencePattern.Interval = int.Parse(dtrow["OccurrEvery"].ToString());

> }
> else if (int.Parse(dtrow["OccurrType"].ToString()) == 1)
> {// it is fine
> recurrencePattern.RecurrenceType = Microsoft.Office.Interop.Outlook.
> OlRecurrenceType.olRecursWeekly;

> recurrencePattern.Interval = int.Parse(dtrow["OccurrEvery"].ToString());
> recurrencePattern.DayOfWeekMask = GetSelectedWeekDays(dtrow);
> }

> else if (int.Parse(dtrow["OccurrType"].ToString()) == 2)
> {

> if (int.Parse(dtrow["OccurrPaternType"].ToString()) == 0)
> { // it is fine
> recurrencePattern.RecurrenceType = Microsoft.Office.Interop.Outlook.
> OlRecurrenceType.olRecursMonthly;
> recurrencePattern.DayOfMonth = int.Parse(dtrow["OccurrEvery"].ToString());
> recurrencePattern.Interval = int.Parse(dtrow["SpecificDay"].ToString());
> }
> else if (int.Parse(dtrow["OccurrPaternType"].ToString()) == 1)
> {

> recurrencePattern.RecurrenceType = Microsoft.Office.Interop.Outlook.
> OlRecurrenceType.olRecursMonthNth;

> *****************
> here how to set "OccurrenceInMonth " means
> "first/second/third/forth/last"
> drop down value

> And

> Day of week(weekday dropdown) i can use "recurrencePattern.DayOfWeekMask"
> but
> in that only week days r there how can i set "Day/weekday/weekend day"

> ***************************

> }

> and last how can i check "End after" / "End by" buttons, there is only "no
> enddate " option

> pelase help me

> recurrencePattern.Interval = int.Parse(dtrow["PatternMonth"].ToString());
> }

> }

> }

> >
> 200910
>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
H Creating yearly recurrence appointment Outlook VBA and Custom Forms 5
N Help creating a VBA macro with conditional formatting to change the font color of all external emails to red Outlook VBA and Custom Forms 5
G Event when creating task from mailitem Outlook VBA and Custom Forms 2
T Outlook creating unwanted tasks in Tasks and Todo from emails Using Outlook 1
Fozzie Bear Outlook 2016 Creating a shared local Contacts folder Using Outlook 2
R Creating a user defined function Outlook VBA and Custom Forms 3
M Creating an RSS Feed **FROM** Outlook 2013 Calendar. Using Outlook 5
O How to prevent CC from showing when creating a new mail? Using Outlook 1
N Creating a button or link to a form in the Organizational Forms Library Outlook VBA and Custom Forms 3
B Creating an email with the list of tasks Outlook VBA and Custom Forms 0
L Creating drafts when I thought I was sending Using Outlook 1
R Would creating a new profile cause Outlook to download all the old mails from the server? Using Outlook 1
A Creating Progress Bar or Status Bar Update Outlook VBA and Custom Forms 0
T Outlook creating a folder named: "Unwanted" Using Outlook 3
M Outlook 2007 Contacts Glitch: Creating a new email Using Outlook 1
Liza Creating a rule in outlook to filter messages Using Outlook 0
A Are categories still recommended for creating local distribution lists? Using Outlook 3
S Creating Email - Selecting Pre-Defined Text Using Outlook 2
D Creating an outlook session from Access vba but run silently. With A specific profile Outlook VBA and Custom Forms 1
M Creating Outlook Appointments from Excel Cells Outlook VBA and Custom Forms 1
N Creating New Profile Using Outlook 0
Y Creating custom appointment request form with multiple mail recipients Outlook VBA and Custom Forms 5
M creating email from contact file = 3 emails in To field Using Outlook 3
P Recover / Extract Rules from standalone PST file creating RWZ file Using Outlook 2
A Creating an outlook rule to forward an email with a specific message Using Outlook 1
I Creating meeting invite with disabled tentative button Outlook VBA and Custom Forms 5
E Creating email templates for organizational use Using Outlook 0
N Creating or changing the main new mail message template in Outlook 2010 Using Outlook 2
D Creating custom view with VBA Outlook VBA and Custom Forms 2
J Outlook creating unwanted rule on its own Using Outlook 1
R Creating a Room Mailbox with Exchange Online Outlook VBA and Custom Forms 0
A Creating a rule on “Deleted items” folder Using Outlook 1
CMG73 Creating templates with predefined subject and CC Using Outlook 1
G Creating Contact Sub Folders Using Outlook 2
Rupert Dragwater creating gmail account in Outlook 2013 Using Outlook 7
nathandavies Creating a Select Case for a directory of folders Outlook VBA and Custom Forms 1
2 creating custom stationery Using Outlook 2
A Help creating macro for conditional formatting settings Using Outlook 8
Fozzie Bear Creating Custom Meeting Form Outlook VBA and Custom Forms 6
U Creating a (This computer only) folder within an IMAP account directory Using Outlook 1
A Creating archive rule on the clients by script/ Outlook VBA and Custom Forms 3
J Creating a URL from a message body excerpt before forwarding Using Outlook 2
B Need Help Creating Email Based on Subject w Address in Body Outlook VBA and Custom Forms 1
A Creating rule to create week folder and transfer mail using alert Using Outlook 3
J Creating an "isolated" shared calendar in Outlook Outlook VBA and Custom Forms 1
L Creating a Task from Email and Attaching Original Email Outlook VBA and Custom Forms 6
S Creating custom rule to move if "NAME" is in body but ignore the phrase "Hi NAME" in the search Using Outlook 2
witzker Outlook bug when creating a user defined contact form? Using Outlook 1
G Creating an Outlook Rule using Internet Header time Using Outlook 1
Wotme Creating a Outlook task in Excel Using Outlook 7

Similar threads

Top