Solved

Is it possible to open an Outlook appointment window from an asp.net control?

Posted on 2011-03-17
9
1,369 Views
Last Modified: 2012-05-11
Hi,
I'd like to open an Outlook appointment window from an asp.net control (say a button or a linkbutton or something, it doesn't really matter). I don't want to send the appointment, just open it with a string of text placed in the text part of the window. Once it was opened displaying the necessary text users would then treat the appointment exactly as they would a manually created one. I'm using Visual Studio 2010 / Outlook 2007 / Outlook 2010 / Exchange 2010.
Thanks in advance,
Louise

0
Comment
Question by:louise001
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
9 Comments
 
LVL 10

Assisted Solution

by:John Claes
John Claes earned 500 total points
ID: 35155752
I Would suggest looking the follwing urls

Google using ".NEt create outlook appointment"
http://www.daniweb.com/software-development/vbnet/threads/31968
http://support.microsoft.com/kb/313788
http://msdn.microsoft.com/en-us/library/ms877306.aspx
http://www.devx.com/getHelpOn/10MinuteSolution/20508/0/page/4
http://www.vbdotnetheaven.com/UploadFile/hirendra_singh/Outlook311092009053215AM/Outlook3.aspx


What you have to do is to create the Object and stream it to the User.
This is the example I used (Quoted from this site: http://www.outlookcode.com/codedetail.aspx?id=775 )


//First thing you need to do is add a reference to Microsoft Outlook 11.0 Object Library. Then, create new instance of Outlook.Application object:
 
Outlook.Application outlookApp = new Outlook.Application ();
 
//Next, create an instance of AppointmentItem object and set the properties:
 
Outlook.AppointmentItem oAppointment = (Outlook.AppointmentItem) outlookApp.CreateItem (Outlook.OlItemType.olAppointmentItem);
 
oAppointment.Subject = "This is the subject for my appointment";
oAppointment.Body = "This is the body text for my appointment";
oAppointment.Location = "Appointment location";
 
// Set the start date
oAppointment.Start = Convert.ToDateTime ("10/10/2004 10:00:00 AM");
// End date
oAppointment.End = Convert.ToDateTime ("10/10/2004 2:00:00 PM");
// Set the reminder 15 minutes before start
oAppointment.ReminderSet = true;
oAppointment.ReminderMinutesBeforeStart = 15;
 
//Setting the sound file for a reminder:
set ReminderPlaySound = true
//set ReminderSoundFile to a filename.
 
//Setting the importance:
//use OlImportance enum to set the importance to low, medium or high
 
oAppointment.Importance = Outlook.OlImportance.olImportanceHigh;
 
/* OlBusyStatus is enum with following values:
olBusy
olFree
olOutOfOffice
olTentative
*/
oAppointment.BusyStatus = Outlook.OlBusyStatus.olBusy;
 
//Finally, save the appointment:
 
// Save the appointment
oAppointment.Save ();
 
// When you call the Save () method, the appointment is saved in Outlook. Another useful method is ForwardAsVcal () which can be used to send the Vcs file via email.
 
Outlook.MailItem mailItem = oAppointment.ForwardAsVcal ();
mailItem.To = "recipients email address";
mailItem.Send ();

Open in new window

0
 

Author Comment

by:louise001
ID: 35156687
Thanks, I am reading ...
0
 
LVL 10

Expert Comment

by:John Claes
ID: 35165989
Louise,

does it work for you ?
0
Webinar: Aligning, Automating, Winning

Join Dan Russo, Senior Manager of Operations Intelligence, for an in-depth discussion on how Dealertrack, leading provider of integrated digital solutions for the automotive industry, transformed their DevOps processes to increase collaboration and move with greater velocity.

 

Accepted Solution

by:
louise001 earned 0 total points
ID: 35176079
Hello again,
Whenever I try to instantiate a New Microsoft.Office.Interop.Outlook.Application I'm repeatedly getting this error or similar:
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80010001 Call was rejected by callee. (Exception from HRESULT: 0x80010001 (RPC_E_CALL_REJECTED)).

I'm wondering if it's something to do with accounts under which Internet Explorer and Outlook run or some other permissions issue. In the end I found this solution which works perfectly for my requirements: http://msdn.microsoft.com/en-us/library/bb655909%28office.12%29.aspx.

I'll award you the points as you pointed me in the right direction.
0
 

Author Comment

by:louise001
ID: 35176102
My mistake, I intended to mark expert comment and my own comment as answers and award points to expert. Could you please cancel so I can do that? Thanks.
0
 
LVL 10

Expert Comment

by:John Claes
ID: 35178957
please read the commont ;-)
0
 
LVL 10

Expert Comment

by:John Claes
ID: 35178958
please read the comment ;-)
0
 

Author Closing Comment

by:louise001
ID: 35230033
poor_beggar, thanks for your help.
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question