Reputation: 572
Is it possible to create an appointment in Outlook from a custom Sharepoint Web Part programmatically? VB.Net links or examples would be most helpful.
Thanks.
Upvotes: 1
Views: 2362
Reputation: 60058
Here are some options:
Dynamically generate ICS file
The simplest way is to generate an ICS (iCalendar) file and present it for download. This won't automatically create the appointment but it's quite easy for the user to open and save into Outlook. There's a great tutorial on MSDN that shows how to do this.
Use MAPI
You can add Javascript or VBScript to your ASP.NET page and use MAPI to do this as well. Here's the code required. Again this won't automatically create the appointment. Other disadvantages are that the user will receive a security prompt, it will only work in IE, and IE's security settings need to be set to allow ActiveX scripting.
Use Exchange
If Outlook has been deployed into a corporate environment using Exchange, you have a few options: CDOEX (fairly obsolete), WebDAV (less obsolete), and Exchange Web Services (recommended). There is example code for all of these here. Provided one of these options has been configured this is your best bet for a good user experience.
Upvotes: 2