Hi guys,
I have a problem
I need to make an appointment with some bold text in it.
I also want to set a category for it (color)...

I heared that it is possible to implict RTF into appointment.body - but I dunno how to do that...

My code is:

// Create a OOM reference 
                Outlook.Application outApp = new Microsoft.Office.Interop.Outlook.Application();
                // Acquire the namespace 
                Outlook.NameSpace ns = outApp.GetNamespace("MAPI");
                // Create a receipient object that is going to be the organizer of the meeting 
                Outlook.Recipient myOrganizer =
                ns.CreateRecipient(calendar); //"PMI, IS European Help Desk - Poland"
                myOrganizer.Resolve();
                // Open the shared calendar for this receipient 
                Outlook.MAPIFolder sharedCalendar = ns.GetSharedDefaultFolder(myOrganizer, Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderCalendar);
                Outlook._AppointmentItem myAppointment = (Outlook._AppointmentItem)sharedCalendar.Items.Add(Outlook.OlItemType.olAppointmentItem);
                // Setup the requirements for the appointment 
                myAppointment.MeetingStatus = Microsoft.Office.Interop.Outlook.OlMeetingStatus.olMeeting;                       
                DateTime date1 = dateTimePicker1.Value.Date + TimePicker1.Value.TimeOfDay;
                DateTime date2 = dateTimePicker1.Value.Date + TimePicker2.Value.TimeOfDay;
                myAppointment.Start = Convert.ToDateTime(date1); // Set the start date 
                myAppointment.End = Convert.ToDateTime(date2);
                myAppointment.Subject = SUBJECT_APPOINTMENT();
                myAppointment.Body = ">>>I NEED IT BOLD<<<SYSTEMS: " + SystemBox.Text + Environment.NewLine;
                myAppointment.Body += ">>>I NEED IT BOLD<<<DESCRIPTION: " + Environment.NewLine + EngBox.Text;
                myAppointment.Importance = Outlook.OlImportance.olImportanceHigh;
                // Save the appointment in the shared calendar 
                myAppointment.Save();
                // Send out the invites 
                myAppointment.Send();
                AddMessage("\r\nAPPOINTMENT CREATED: ", Color.Green, FontStyle.Regular);
                AddMessage(calendar, Color.Black, FontStyle.Regular);

THX for help!

hi

try myAppointment.RTFBody instead of myAppointment.Body

thanks

Unfortunatelly "myAppointment.RTFBody" doesn't work.
"no definition for 'RTFBody'" So I cannot do that..
I have managed to use categories with "myAppointment.Categories", but still cant make appointment text BOLD..
I have hearead that there is a method to transform rtf formulas into appointment body, but I really dont know how to do that...If somebody knows any method to make color/bold text in appointment, please share it with me....THX!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.