none
How to send meeting request through sharepoint

    Question

  • Hi,

      how can i send an appointment item for meeting through sharepoint. I tried using Outlook object model which works fine in asp.net but when the same code is used in sharepoint site then it throws me an error.

    Microsoft.Office.Interop.Outlook.AppointmentItem mtg = (Microsoft.Office.Interop.Outlook.AppointmentItem)outLookApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olAppointmentItem);
    mtg.MeetingStatus = Microsoft.Office.Interop.Outlook.OlMeetingStatus.olMeeting;
    mtg.Location = "Meeting Room";
    mtg.RequiredAttendees = "xyz@xyz.com";
    mtg.Subject = "SharePoint meeting";
    mtg.Start = DateTime.Now.AddMinutes(10);
    mtg.Duration = 60;
    mtg.Body = "This is just a test meeting from C#";
    mtg.ReminderMinutesBeforeStart = 60;
    mtg.ReminderSet = true;
    mtg.Send();

    As soon as the send method is excuted we get ERROR: "Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))"

    any help is highly appreciated.

    Regards,
    Nichie.
    Thursday, March 20, 2008 11:33 AM

All replies

  • SharePoint doesn't support MeetingItems. So any code that makes the appointment a meeting e.g. mtg.MeetingStatus = Microsoft.Office.Interop.Outlook.OlMeetingStatus.olMeeting may be causing the problem.
    Saturday, April 5, 2008 9:41 PM
  • Moving to the Programming forum that deals with Programming questions including questions on the object model.

     

    Please post directly in future and not to general.

    Sunday, April 6, 2008 5:52 PM
  •  

    I wrote a blogpost about this subject. I am using the Outlook object model without problems in it to send out meeting requests. I hope this can help you out?
    Sunday, April 6, 2008 8:02 PM
  • Hi,

        Have a look to this demo code i wrote.

     

                 DateTime d1 =new DateTime(2010,3,22,18,00,00);

                DateTime d2 = new DateTime(2010, 3, 22, 18, 30, 00);

     

                Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application();

     

                AppointmentItem item = (Microsoft.Office.Interop.Outlook.AppointmentItem)app.CreateItem(OlItemType.olAppointmentItem);

                item.Subject = "Configured Programmatically";

                item.Location = "India";

                item.Start = d1;

                item.End = d2;

                item.AllDayEvent = false;

                item.Body = "Meeting";

                item.ReminderSet = true;

                item.ReminderMinutesBeforeStart = 15;

                item.Save();  // Use this statement to save meeting request to outlook

     

    Regards, 

    Milan c.

     


     

     

    Monday, March 22, 2010 10:38 AM
  • you can always create any type of calender requests without using Outlook, once you create it add it in your workflow by creating custom code step in workflow using VS.

    please go through this post http://kobikobi.wordpress.com/2009/01/03/sending-meeting-requests-to-outlook-via-aspnet-mail-message/

    in above post he has explained how to create and send the appoinments.

    and some more

    http://stackoverflow.com/questions/461889/sending-outlook-meeting-requests-without-outlook,

    http://207.46.16.251/en-us/library/bb655909.aspx

    http://forums.asp.net/p/1036630/1434024.aspx#1434024


    Regards, Vikas Patel.
    Monday, March 22, 2010 10:40 AM
  • Nichie

    I already implemented this iCal application with sharepoint succesfully.  It has one limitation i.e. ysing iCal appointment with Outlook Client it works very nicely, but when you open  iCal appointment with Web Based Outlook, it wont allow you to do anything, secondly some the comapny are blocked iCal file type to avoid any kind trojan/melaware/.virus attack.

    URL suggested by Vikas has lots of sample code, let me know if you still need any kind of help


    Ashish Kanoongo, MCP, MCSD, MCTS
    Monday, March 22, 2010 12:01 PM
  • I am facing same problem ????

    Any Help Please


    Manesh
    Friday, June 25, 2010 1:47 PM
  • you can always create any type of calender requests without using Outlook, once you create it add it in your workflow by creating custom codec step in workflow using VS.

    please go through this post http://kobikobi.wordpress.com/2009/01/03/sending-meeting-requests-t-outlook-via-aspnet-mail-message/

    in above post he has explained how to create and send the appoinments.

    and some more

    http://stackoverflow.com/questions/461889/sending-outlook-meeting-requests-without-outlook,

    http://207.46.16.251/en-us/library/bb655909.aspx

    http://forums.asp.net/p/1036630/1434024.aspx#1434024


    Regards, Vikas Patel.

    Is the problem with the my network here? The link cannot be opened.
    Tuesday, August 24, 2010 12:52 AM
  • I've been looking for a way to accomplish the same thing. I had an idea that it could be done using a workflow. I was monkeying around with the "send an email" action in SPD 2010 and found that if I go to the action and click properties, I can edt the properties of the email directly. Here's what the Body tag parameter had in it:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"><HTML><HEAD><META NAME="Generator" CONTENT="MS Exchange Server version 08.01.0240.003"><TITLE></TITLE></HEAD><BODY><!-- Converted from text/rtf format --><P><SPAN LANG="en-us"><FONT SIZE=2 FACE="Tahoma">Sending message</FONT></SPAN><BR><SPAN LANG="en-us"><FONT FACE="Arial">[%CurrentItem:Title%]</FONT></SPAN></P></BODY></HTML>
    
    It makes me think that if we could get the html formatting for a meeting request we could be able to have the workflow dynamically create and send requests whenever an appointment is added or changed. I'm not sure where to get that formatting though, so this is just a direction to explore for the moment.
    Wednesday, August 25, 2010 3:34 AM
  • Try following these steps for a sharepoint calendar workflow:

    Step 1 - Open SP   Designer:

    In SharePoint, click on Site Actions>Edit in SharePoint Designer.

    Step 2 – Navigate to   Calendar List:

    Navigate to “Lists and Libraries” and click on your calendar.

    Note: For this example we will use the calendar name “DC Calendar.”

    Step 3 – Create New   Workflow:

    In the Calendar page click on “New” under the Workflows tab.

    Step 4 – Name the   Workflow:

    Enter in a name for the workflow and an optional description.

    Click “OK” when finished.

    Step 5 – Add Action:

    When the Workflow page opens, click on the “Action” button and then   click on “Send an Email” listed under “Core Actions” heading.

    Step 6 – Edit Email   Action:

    Left-click on “these users” (Highlighted in blue).

    Step 7 – Recipients:

    A window should open displaying a sample email.

    First click the book icon, located to the right of the “To:” field   (“CC:” field if applicable).

    Step 8 – Recipients   Lookup:

    1. When the “Select Users” window pops up, select   “Workflow Lookup for a User…”
    2. Click “Add >>”
    3. Another   window will pop up. Select the fields as displayed.

    Click “OK” to exit the Lookup window, then click “OK” to exit the   “Select Users.”

    Step 9 – Subject   Line:

    1. Next,   click on the “…” button to the right of the “Subject” field. A window will   open
    2. Type   in what you would like.
    3. To   add the title click “Add or Change Lookup” button located on the bottom left.

    When the new window opens set the   following:

    Data Source: Current   Item

    Field From Source:   Title

    Click “OK” to complete.

    Step 10 – Email Body:

    1. Type   in the text as shown:
      ---
      TO: Current Item:Invite Attendee
      Subject: New Event Notification - [%Current Item:Title%]
      Body Text: You have been invited for the following event:
                       Event Name: [%Current Item:Title%]
                       Event Start Time: [%Current Item:Start Time%]
                       Event End Time: [%Current Item:End Time%]
      ---
      But DO NOT type the text with the brackets. That should be selected through the button option.
    2. After   typing the Event Name etc… click on the URL icon. A window will pop up.
    3. In   the Hyperlink window select the “…” button.
    4. Click   the “Add or Change Lookup” button located on the bottom.

    When the new window opens set   the following:

    Data Source: Current   Item

    Field From Source:   Title

    Click “Ok” when finished.

    Note: Repeat these steps or the rest of the   content (I.e. Event Start time).

    Only use the “Text to display” field, DO NOT enter   an address.

    Step 11 – Add Event   Hyperlink:

    1. Assuming   you haven’t added the Hyperlink yet, click the URL button.
    2. Enter   what you whatever text you see reasonable to notify the attendee they can   click the link to add it to their calendar.
    3. Select   the “…” button located to the right of the “Address:” field.
    4. Paste   the following URL and modify with your sites’ information:

    https://mycompanysite/sites/sitename/pagename/subpagename/pagewherecalendarislocated/_vti_bin/owssvr.dll?CS=109&Cmd=Display&List=[ENTER LIST GUID HERE]&CacheControl=1&ID=[%Current   Item:ID%]&Using=event.ics

    Note: The URL before “/_vti_bin” can vary   depending on where your calendar is located. Best way to get it is navigate   to your SharePoint Calendar and copy the URL before the “Lists” library.

    1. Find   the GUID of the list and insert it into the URL in the following format:   12345678-1234-1234-1234-123456789ABCD

    Make sure no spaces are before   it or after it.

    1. Delete   [Current Item:ID%] that was pasted in when you copied the URL.
    2. After   it has been deleted click the “Add of Change Lookup” button located on the bottom   left.

    Assign the appropriate   articles:

    Data Source: Current   Item

    Field From Source: ID

    Click “OK” to complete.

    Step 12 – View Event   Hyperlink:

    1. To   create a link to the SharePoint Event, click the URL button.
    2. Enter   the appropriate text (I.e. Click to view event in SharePoint).
    3. Press   the “…” button to the right of the “Address:” field.
    4. Once   it’s open copy the URL from the actual event, something like this:

    https://mycompanysite/sites/sitename/pagename/subpagename/pagewherecalendarislocated/Calendar/DispForm.aspx?ID=123

    You will want to remove the   numbers after “ID=” and in the example above you would delete “123” from the   URL.

    Once it has been removed,   click “Add or Change Lookup” and apply the following:

    Data Source: Current   Item

    Field From Source: ID

    Click “OK” to complete.

    Step 13 - Publishing:

    Once complete, navigate to the Workflow settings and select “Start   workflow automatically when an item is created” under the “Start Options”   tab.

    Don’t forget to Save and Publish your workflow.

    Friday, September 6, 2013 1:57 PM
  • There is a solution that works without using the Outlook object model. It sends meeting requests directly from a SharePoint calendar. http://www.sharepointsapiens.com/calendar-email-extension/

    Monday, April 7, 2014 11:39 AM