Creating recurrence appointment

  • Thread starter hemaneelagiri via OfficeKB.com
  • Start date
H

hemaneelagiri via OfficeKB.com

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());
}

}

}
 
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 via OfficeKB.com said:
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());
}

}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top