PC Review


Reply
Thread Tools Rate Thread

How can I send an Appointment to the Recipents?

 
 
Gian Paolo Costantino
Guest
Posts: n/a
 
      17th Mar 2009
Hi,
I tried to create an Appointment with some Recipients, then I'd like to send
the
meeting request to the Recipients, but nothing was sent.

This is the code I used:

using Outlook = Microsoft.WindowsMobile.PocketOutlook;

....

using (Outlook.OutlookSession osess = new Outlook.OutlookSession ())
{
Outlook.Appointment appt = new Outlook.Appointment ();
appt.Subject = "N2";
appt.Location = "B";
appt.Recipients.Add (new Outlook.Recipient (name, address));
appt.Start = DateTime.Now.AddHours (1);
appt.End = appt.Start.AddHours (1);
appt.Body = "C";
osess.Appointments.Items.Add (appt);
appt.Update ();
appt.Send ();
}

No email is sent and nothing appears in the "Outbox" folder.
I'm using a Windows Mobile Professional 6.1 device and CF 2.0

Thank you in advance
 
Reply With Quote
 
 
 
 
Peter Foot
Guest
Posts: n/a
 
      17th Mar 2009
What email accounts do you have configured on your device? Do you have the
Outlook E-mail account and if so does it sync to desktop Outlook or Exchange
Server?

Peter

--
Peter Foot
Microsoft Device Application Development MVP
peterfoot.net | appamundi.com | inthehand.com
APPA Mundi Ltd - software solutions for a mobile world
In The Hand Ltd - .NET Components for Mobility

"Gian Paolo Costantino" <(E-Mail Removed)>
wrote in message news:E8CEE0CE-F462-40F5-9AF9-(E-Mail Removed)...
> Hi,
> I tried to create an Appointment with some Recipients, then I'd like to
> send
> the
> meeting request to the Recipients, but nothing was sent.
>
> This is the code I used:
>
> using Outlook = Microsoft.WindowsMobile.PocketOutlook;
>
> ...
>
> using (Outlook.OutlookSession osess = new Outlook.OutlookSession ())
> {
> Outlook.Appointment appt = new Outlook.Appointment ();
> appt.Subject = "N2";
> appt.Location = "B";
> appt.Recipients.Add (new Outlook.Recipient (name, address));
> appt.Start = DateTime.Now.AddHours (1);
> appt.End = appt.Start.AddHours (1);
> appt.Body = "C";
> osess.Appointments.Items.Add (appt);
> appt.Update ();
> appt.Send ();
> }
>
> No email is sent and nothing appears in the "Outbox" folder.
> I'm using a Windows Mobile Professional 6.1 device and CF 2.0
>
> Thank you in advance


 
Reply With Quote
 
Gian Paolo Costantino
Guest
Posts: n/a
 
      17th Mar 2009
I have an IMAP email account defined.
Notice that when I use the device Calendar application to manually create
a meeting, the invitation is correctly sent to the recipients.

"Peter Foot" wrote:

> What email accounts do you have configured on your device? Do you have the
> Outlook E-mail account and if so does it sync to desktop Outlook or Exchange
> Server?
>
> Peter
>
> --
> Peter Foot
> Microsoft Device Application Development MVP
> peterfoot.net | appamundi.com | inthehand.com
> APPA Mundi Ltd - software solutions for a mobile world
> In The Hand Ltd - .NET Components for Mobility
>
> "Gian Paolo Costantino" <(E-Mail Removed)>
> wrote in message news:E8CEE0CE-F462-40F5-9AF9-(E-Mail Removed)...
> > Hi,
> > I tried to create an Appointment with some Recipients, then I'd like to
> > send
> > the
> > meeting request to the Recipients, but nothing was sent.
> >
> > This is the code I used:
> >
> > using Outlook = Microsoft.WindowsMobile.PocketOutlook;
> >
> > ...
> >
> > using (Outlook.OutlookSession osess = new Outlook.OutlookSession ())
> > {
> > Outlook.Appointment appt = new Outlook.Appointment ();
> > appt.Subject = "N2";
> > appt.Location = "B";
> > appt.Recipients.Add (new Outlook.Recipient (name, address));
> > appt.Start = DateTime.Now.AddHours (1);
> > appt.End = appt.Start.AddHours (1);
> > appt.Body = "C";
> > osess.Appointments.Items.Add (appt);
> > appt.Update ();
> > appt.Send ();
> > }
> >
> > No email is sent and nothing appears in the "Outbox" folder.
> > I'm using a Windows Mobile Professional 6.1 device and CF 2.0
> >
> > Thank you in advance

>

 
Reply With Quote
 
Gian Paolo Costantino
Guest
Posts: n/a
 
      29th Apr 2009
After a long while I came back to analyze my problem and I found two
workarounds.
1- Writing all the code in a native way following more or less the article
http://msdn.microsoft.com/en-us/library/aa913108.aspx
2- Forcing
appt.Properties[Outlook.AppointmentProperty.MeetingStatus] = (uint)
Outlook.MeetingStatus.Meeting;
before sending the appointment
(the appt.Update () has to be done after sending).
It seems a bug of the CF implementation of Recipients.Add
since, after this call, the MeetingStatus is still NotMeeting.
If someone is interested in my analysis I can share it.

"Gian Paolo Costantino" wrote:

> Hi,
> I tried to create an Appointment with some Recipients, then I'd like to send
> the
> meeting request to the Recipients, but nothing was sent.
>
> This is the code I used:
>
> using Outlook = Microsoft.WindowsMobile.PocketOutlook;
>
> ...
>
> using (Outlook.OutlookSession osess = new Outlook.OutlookSession ())
> {
> Outlook.Appointment appt = new Outlook.Appointment ();
> appt.Subject = "N2";
> appt.Location = "B";
> appt.Recipients.Add (new Outlook.Recipient (name, address));
> appt.Start = DateTime.Now.AddHours (1);
> appt.End = appt.Start.AddHours (1);
> appt.Body = "C";
> osess.Appointments.Items.Add (appt);
> appt.Update ();
> appt.Send ();
> }
>
> No email is sent and nothing appears in the "Outbox" folder.
> I'm using a Windows Mobile Professional 6.1 device and CF 2.0
>
> Thank you in advance

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how many recipents can i send to during a email merge? =?Utf-8?B?dmFuZXNzYQ==?= Microsoft Outlook Discussion 3 19th Jun 2007 05:19 PM
Send on Behalf for Appointment =?Utf-8?B?Sg==?= Microsoft Outlook Calendar 0 26th May 2006 01:15 AM
Send Outlook Appointment from VB.NET =?Utf-8?B?QWxleCBDLiBCYXJiZXJp?= Microsoft Dot NET Framework 1 12th Jan 2006 04:01 PM
When working with an appointment form, does the SEND UPDATE button really performing the DELETE and SEND operations? Rick Newton Microsoft Outlook VBA Programming 1 12th May 2005 08:50 PM
How to get the currently selected appointment start & enddate of a single appointment in a recurring appointment series? Fredrik Nelson Microsoft Outlook VBA Programming 0 29th Apr 2004 05:18 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:41 AM.