Create an Outlook Appointment

C

chuckdfoster

Is there a way to create an New Outlook Appointment from an ASP.NET
application? I would also need to check if Outlook is running first. Any
suggestions, advice?
 
C

Curt_C [MVP]

I suggest an easier route. Create an .ICS file that the user simply
imports/executes to add it to their client outlook settings.
 
C

chuckdfoster

Could you give me some code to get me started. I understand what a ICS file
looks like, but how do you get it to save to the client's PC? Is there a
way to do it withou them being prompted to Save,Open, Cancel? Thanks for
your help.
 
C

chuckdfoster

Can you give me insight as to how the whole process works and what happens
where? As you can tell, I haven't been developing ASP.NET for very long (a
few months). I apoligize for the inexperiece.
 
C

chuckdfoster

I found it on the web. I found the sample code at
http://www.devx.com/getHelpOn/10MinuteSolution/20508/0/page/4

For anyone who needs it, here is my code....For DTSTART and DTEND the value
is yyyymmddThhmmssZ (greenwich time).
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Dim strFile As String

Dim strvCalendar

strFile = "BEGIN : VCALENDAR" & vbCrLf & _

"PRODID:-//Microsoft Corporation//Outlook 11.0 MIMEDIR//EN"
& vbCrLf & _

"VERSION:1.0" & vbCrLf & _

"BEGIN : VEVENT" & vbCrLf & _

"DTSTART:20041223T143000Z" & vbCrLf & _

"DTEND:20041223T150000Z" & vbCrLf & _

"LOCATION;ENCODING=QUOTED-PRINTABLE:IT Conference Room" &
vbCrLf & _

"DESCRIPTION;ENCODING=QUOTED-PRINTABLE:The team has voted to
have Turnover" & vbCrLf & _

"SUMMARY;ENCODING=QUOTED-PRINTABLE:Financial Call Team
Turnover Meeting" & vbCrLf & _

"PRIORITY:3" & vbCrLf & _

"End : VEVENT" & vbCrLf & _

"End : VCALENDAR"

Response.ContentType = "text/x-vCalendar"

Response.AddHeader("Content-Disposition", "filename=Event1" &
".vcs;")

Response.Write(strFile)

Response.End()

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top