Hardwork

In a asp.net application, using vCalendar i'm creating a .vcs file, in which i've added mutliple events of different dates. In my web page i have a link to Export all appoitments to Outlook. When i click this link , i;m generating the .vcs file on the fly and flushing the contents to the browser using response object. Its prompting a dialog box with open , save and close. Everything goes fine until this. When i open the file , its opening in outlook and when i save & close the appoitment , its not creating multiple appoitments.Its creating only the first one. ;(.

Here is the code,

vCalendarwriter.WriteLine("BEGIN:VCALENDAR");

vCalendarwriter.WriteLine("PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN");

vCalendarwriter.WriteLine("VERSION:1.0");

vCalendarwriter.WriteLine("BEGIN:VEVENT");

vCalendarwriter.WriteLine("SUMMARY;ENCODING=QUOTED-PRINTABLE:" + strsubject);

vCalendarwriter.WriteLine("LOCATION;ENCODING=QUOTED-PRINTABLE:" + strlocation);

vCalendarwriter.WriteLine("DTSTART:" + strSDate);

vCalendarwriter.WriteLine("DTEND:" + strEDate);

vCalendarwriter.WriteLine("DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" + generateDescription(i));

vCalendarwriter.WriteLine("CATEGORIES;ENCODING=QUOTED-PRINTABLE:" + strcategory);

vCalendarwriter.WriteLine("PRIORITY:1");

vCalendarwriter.WriteLine("END:VEVENT");

vCalendarwriter.WriteLine("BEGIN:VEVENT");

vCalendarwriter.WriteLine("SUMMARY;ENCODING=QUOTED-PRINTABLE:" + strsubject);

vCalendarwriter.WriteLine("LOCATION;ENCODING=QUOTED-PRINTABLE:" + strlocation);

vCalendarwriter.WriteLine("DTSTART:" + strS1Date);

vCalendarwriter.WriteLine("DTEND:" + strE1Date);

vCalendarwriter.WriteLine("DESCRIPTION;ENCODING=QUOTED-PRINTABLE:" + generateDescription(i));

vCalendarwriter.WriteLine("CATEGORIES;ENCODING=QUOTED-PRINTABLE:" + strcategory);

vCalendarwriter.WriteLine("PRIORITY:1");

vCalendarwriter.WriteLine("END:VEVENT");

vCalendarwriter.WriteLine("END:VCALENDAR");

I would like to create mulitple outlook appointment using a single .vcs file(Not by manually exporting), but by opening the file from the web page. Does vCalendar supports multiple events



Re: Visual Studio Tools for Office vCalendar Multiple Events

Sue Mosher - Outlook MVP

In general, Outlook doesn't support that. A user can import a multi-event .vcs file manually using the File | Import and Export command. Plus Outlook 2007 can import an multi-event .ics (VERSION:2.0) file by double-clicking. (I'm not sure about a .vcs VERSION:1.0 file.) But earlier versions definitely cannot import multiple items from a single file just by opening the file.