none
Getting Extra content in body of outlook appointment item created by using appointment class RRS feed

  • Question

  • HI

    I am new to fairly new to EWS had has implemented in C# for creating outlook appointment. I am using 2007_sp1 and outlook version is also 2007.

    Looks like everything is working fairly ok, appointment is getting created successfully in outlook. But I am alos getting extra details in body of the appointment which we dont want. In body of the calender I am getting "When and Where section added which is on UTC timezone." Please reffer to the snippet below

    ------------------------------------------------------------------

    When: Saturday, June 30, 2012 3:00 PM-4:00 PM. UTC
    Where: 1-b1-f1-r100a (retest),1-b1-f1-r106a (MECHANICAL),0-off-site (Off-site)
    *~*~*~*~*~*~*~*~*~*
     

    --------------------------------------------------------------------------------------------------------

    Weird part is I also get email as a notifaction when this appointment get created. If I open the email then above message is not showing. But if I open the Calendar Item from Calender folder, we are getting above message get added to body.

    Above message is creating confustion to user because "When" section is showing time in "UTC" timeZone and actual event schedule and showing correctly in Start Date and End Date colum ion desired TimeZone.

    I tried to get the timezone of this message to get it sync eith Start Date and Endate but no luck. Even I tried to remove this message from body section but couldn't get any success. I also tried to intantiate ExchangeWebService with TimeZoneInfo to take the one configured and get out of of default (UTC), but this didnt worked either. Satrt Date and End Date field of calendar got change but this message remain same with time of UTC.

    As per reference docuemtation , I think this is showing from AppointmentClass.When property but didnt got a way to track this down. Can anyone please help me to either get rid of this message from appointment body or let me knwo the way I can change the timeZone from UTC to desired timeZone.

     Thanks in advance

    Shiv

    Saturday, June 9, 2012 9:53 PM

Answers

  • I stand corrected, this info appears in body but only for atendees of meeting, not the owner. I have no idea if this can be changed, but i would ask on exchange forum, because in sent items folder of owner such information is not present, so exchange is the suspect here.
    Tuesday, June 12, 2012 8:42 AM
  • on my machines this message appears for meetings created also from UI, but only for atendees, not the organizer of the meeting. In organizer Sent Items folder meeting erequest does not contain such values, but in atendee inbox, it is already there, so i guess exchange appends it.
    Wednesday, June 13, 2012 7:12 AM
  • the former - exchange in general.

    Wednesday, June 13, 2012 7:57 AM

All replies

  • please show full code for creating appointments.

    Sunday, June 10, 2012 5:41 AM
  • Thanks for your response Damian,

    This is the method i am calling to create appointment.

    public string CreateAppointment(System.DateTime startTime, System.DateTime endTime,
                string Subject, string Location, string HTMLBody, int ReminderOffset, OCMInstanceTypes InstanceType,
                OCMRecurrenceEnum Frequency, int Interval, System.DateTime endDate, System.DateTime[,] RecurrenceDateList)
            {
                string AppointmentURL;
                Appointment appt = null;
                ExchangeService service = EWSConnection(OwnerEmailAddress);
                
                
                
                string checkUID = "";
                try
                {
                    appt = new Appointment(service);

                    appt.Start = startTime.ToLocalTime();
                     appt.End = endTime.ToLocalTime();
                    appt.Subject = Subject;
                    appt.Location = Location;
                     appt.Body = HTMLBody;
                     appt.IsAllDayEvent = false;
                    appt.IsResponseRequested = true;
                    appt.Save();
                    checkUID = appt.Id.UniqueId.ToString();
           
                }
                catch (Exception e)
                {
                    throw new Exception("CreateAppointment Error", e);
                }
                finally
                {
                    service.ImpersonatedUserId = null;
                }
              
                return appt.Id.ToString();

                
            }

    Tuesday, June 12, 2012 1:35 AM
  • I stand corrected, this info appears in body but only for atendees of meeting, not the owner. I have no idea if this can be changed, but i would ask on exchange forum, because in sent items folder of owner such information is not present, so exchange is the suspect here.
    Tuesday, June 12, 2012 8:42 AM
  • May be you are right. I know outlook is plugin with Live meeting and
    lync meeting. Is there anyway we can verify if its coming from 3rd
    party. Strange part is we are getting this text only if its created by
    code. If I manually create an appointment in Outlook no extra text
    appear.

    Thanks for your response

    Shiv
    Wednesday, June 13, 2012 4:56 AM
  • on my machines this message appears for meetings created also from UI, but only for atendees, not the organizer of the meeting. In organizer Sent Items folder meeting erequest does not contain such values, but in atendee inbox, it is already there, so i guess exchange appends it.
    Wednesday, June 13, 2012 7:12 AM
  • by exchange do you mean "mail exchange server" or "Microsoft Exchange Web Service". I suspect its EWS, but unfortunately didnt found any way we can control this text
    Wednesday, June 13, 2012 7:40 AM
  • the former - exchange in general.

    Wednesday, June 13, 2012 7:57 AM
  • I am also facing the same issue of "When & Where" from EWS notification. I can see this thread is Marked as Answer but I can't find any resolution here. Is there any way to hide this text?
    Friday, July 20, 2012 2:48 PM