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
  #1  
Old April 18th 06, 11: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();
}
}
}

Ads
  #2  
Old April 19th 06, 12:02 AM posted to microsoft.public.outlook.program_addins
Rog
external usenet poster
 
Posts: 62
Default How to create AppointmentItem in inbox (Outlook 2002)

Instead of an AppointmentItem try MeetingItem.
rog

Galois wrote:
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();
}
}
}

  #3  
Old April 27th 06, 09:01 AM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default How to create AppointmentItem in inbox (Outlook 2002)

Even then, a meeting request that has not been sent and received is not going to have Accept and Reject buttons.

Why not create a message with an iCalendar attachment? Or just display the appointment directly to the user without making them open it first?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Rog" wrote in message ...
Instead of an AppointmentItem try MeetingItem.
rog

Galois wrote:
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 06:10 AM
Can't view hotmail inbox in outlook 2002 Pinhas Outlook - General Queries 1 March 28th 06 11:34 AM
How to automatically download to Outlook inbox from netzero inbox. Very inexperienced Outlook user Outlook - Installation 2 March 27th 06 01:07 AM
Outlook 2002 quits when selecting Inbox. K C Outlook - Installation 0 January 28th 06 12:41 AM
AppointmentItem question (2003) Dana DeLouis Outlook and VBA 1 January 18th 06 06:13 PM


All times are GMT +1. The time now is 03:32 PM.


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.