PC Review


Reply
Thread Tools Rate Thread

Create Outlook Appt in Excel VBA

 
 
New Member
Join Date: Mar 2011
Posts: 1
 
      23rd Mar 2011
Hello,

I would like to create an Outlook appointment in Excel VBA. I was trying to use late binding (because I'm not sure which version my users would have, and because early binding wasn't working for me). Here's what I have so far:

Code:
 
Sub appointment()
 
Dim OutlookApp
Dim AP
Set OutlookApp = GetObject(, "Outlook.Application")
OutlookApp.GetNamespace("MAPI").Logon
Set AP = OutlookApp.CreateItem(olAppointmentItem)
With AP
.Display (True)
End With
 
End Sub
The problem is that not matter what I put in the CreateItem parentheses, it always returns an email item (instead of an appointment). Any help would be very welcome! Thank you!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why won't outlook let me create or save a new appt Lis Microsoft Outlook Calendar 1 24th May 2009 07:05 AM
use Access data to create appt. in outlook MKMurphy Microsoft Outlook VBA Programming 0 4th Dec 2008 09:25 PM
Create Outlook event/appt in non-default calendar folder Finny388 Microsoft Excel Programming 2 29th Jun 2007 07:50 AM
Outlook reminder times BEFORE appt. vs. AFTER setting appt.? =?Utf-8?B?Q1BBaG9taWU=?= Microsoft Outlook Calendar 4 28th Mar 2007 01:00 AM
Create Excel Template- Weekly Appt. Schedule by 15-min increments =?Utf-8?B?bmF2eWthcHBha2l0dGVuNzU=?= Microsoft Excel Misc 0 8th Sep 2006 02:46 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:14 AM.