Solved

Insert directly into Outlook Calendar via .NET?

Posted on 2008-10-01
4
489 Views
Last Modified: 2013-11-26
Hi,

I've got a project which requires me to directly insert an calender item directly into the users outlook calender using .NET.

I've done some research and can see the only way would be webdav...


Does anyone have any recommendations or best ways of doing this? A simular example would be great!

Unfortunately, it has to insert the item via exchange and not the users outlook client.

Thank you,

Nick
0
Comment
Question by:nickrawlins
  • 2
4 Comments
 
LVL 53

Expert Comment

by:Dhaest
ID: 22612959
Adding Calendar Items to Outlook or Other Calendar App from a Webpage via iCalendar
http://ryanfarley.com/blog/archive/2008/08/08/adding-calendar-items-from-a-webpage-via-icalendar.aspx
0
 
LVL 53

Accepted Solution

by:
Dhaest earned 125 total points
ID: 22612961
You can try this code

(source: http://www.daniweb.com/forums/thread31968.html)
Dim objOutlook As Outlook.Application

objOutlook = New Outlook.Application()

Dim objNS As Outlook.NameSpace = objOutlook.Session
 

'---------Write to Shared calendar-----------------

Dim objFolder As Outlook.MAPIFolder = objNS.Folders.Item("Public Folders")

objFolder = objFolder.Folders.Item("All Public Folders")

objFolder = objFolder.Folders.Item("Boss Calendar")
 
 
 

'=========Add appointment to calendar=================

Dim objApp As Outlook.AppointmentItem

objApp = objFolder.Items(Outlook.OlItemType.olAppointmentItem) 
 

With objApp

.Subject = (" Test appointment")

.Location = "Main Office"

.Body = ("test appointment")

.Start = ("1:30pm 11/21/2007")

.Save()

End With

Open in new window

0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Recently while returning home from work my wife (another .NET developer) was murmuring something. On further poking she said that she has been assigned a task where she has to serialize and deserialize objects and she is afraid of serialization. Wha…
This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

743 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now