A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

How to create AppointmentItem in inbox (Outlook 2002)



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old April 18th 06, 10:56 PM posted to microsoft.public.outlook.program_addins
Galois
external usenet poster
 
Posts: 2
Default How to create AppointmentItem in inbox (Outlook 2002)

I'm trying to create an AppointmentItem in the Inbox, so the user could
choose if to accept invitation or not, but Outlook 2002 refuses to do
so.

Anyone knows how to do that?

Code sample, C# (doesn't work - keeps a copy in the Draft folder & and
places the appointment in the calendar), open Outlook before running
this code:

using System;
using System.IO;
using System.Net;

namespace ConsoleApplication1
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Outlook.ApplicationClass app
= new Outlook.ApplicationClass();
Outlook.NameSpace session
= app.GetNamespace("MAPI");
session.Logon(null, null, null, null);

Outlook.MAPIFolder inbox
= session.GetDefaultFolder
(Outlook.OlDefaultFolders.olFolderInbox);

Outlook.AppointmentItem item
= (Outlook.AppointmentItem)inbox.Items.Add
(Outlook.OlItemType.olAppointmentItem);
item.Subject = "Subject";
item.Body = "Body";
item.Location = "Location";
item.ReminderSet = false;

item.Move(inbox);
item.Close(Outlook.OlInspectorClose.olSave);

session.Logoff();
}
}
}

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook: inbox and sent items in one folder vamail Outlook - General Queries 1 April 4th 06 05:10 AM
Can't view hotmail inbox in outlook 2002 Pinhas Outlook - General Queries 1 March 28th 06 10:34 AM
How to automatically download to Outlook inbox from netzero inbox. Very inexperienced Outlook user Outlook - Installation 2 March 27th 06 12:07 AM
Outlook 2002 quits when selecting Inbox. K C Outlook - Installation 0 January 27th 06 11:41 PM
AppointmentItem question (2003) Dana DeLouis Outlook and VBA 1 January 18th 06 05:13 PM


All times are GMT +1. The time now is 01:02 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.