[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.dotnet.framework.interop

Create a new calendar using c#

Timothy Parez

10/12/2007 10:12:00 AM

Hi,

I'm using Microsoft.Office.Interop.Outlook.
I can get the Appointments in the default calendar,
but I would like to create new calendars using code and iterate
through the items in these new calendars.

Can anybody link to an example, as most examples show you how to
create new appointments and such but not how to create a new Calendar.

1 Answer

Timothy Parez

10/12/2007 10:20:00 AM

0

On 12 okt, 12:12, Timothy Parez <timothypa...@gmail.com> wrote:
> Hi,
>
> I'm using Microsoft.Office.Interop.Outlook.
> I can get the Appointments in the default calendar,
> but I would like to create new calendars using code and iterate
> through the items in these new calendars.
>
> Can anybody link to an example, as most examples show you how to
> create new appointments and such but not how to create a new Calendar.

Sorry, just found the solution. I was trying to add a folder to the
root.
Instead I had to:

MAPIFolder folder = ns.Folders.GetFirst();
folder.Folders.Add("test", OlDefaultFolders.olFolderCalendar);

Now I have to see if I can iterate through these new calendars :)