Computing.Net > Forums > Office Software > VB macro to create a calendar appt. via excel

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

VB macro to create a calendar appt. via excel

Reply to Message Icon

Name: KaviSam
Date: October 14, 2009 at 14:16:35 Pacific
OS: XP
CPU/Ram: 1.733 GHz / 1013 MB
Product: Microsoft Office 2003 basic edition
Subcategory: Microsoft Office
Comment:

Hi I have a excel sheet where users can fill the details and then click a button "Email". This button runs a macro and it opens a new message box of the default email program and pasts the details entered by the users.

I need help in creating calendar appointments using the same concept. Is it possible... Please help.



Sponsored Link
Ads by Google

Response Number 1
Name: riX
Date: October 14, 2009 at 23:45:46 Pacific
Reply:

Dim outlookApp as Object
Dim outlookItem as Object

Set outlookApp = CreateObject("outlook.application")
Set outlookItem = outlookApp.CreateItem(olTaskItem)

With outlookItem
.Subject = "the subject"
.Body = "the body"
.NoAging = True
.DueDate = ""
.StartDate = ""
.Attachments.Add ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
.Importance = ""
.ReminderSet = True
.ReminderTime = ""
.Close (olSave)
End With

Set outlookItem = Nothing
Set outlookApp = Nothing


0

Response Number 2
Name: KaviSam
Date: October 15, 2009 at 01:40:12 Pacific
Reply:

Hi rix, when i run this code it gives me an error 424 object required.


0

Response Number 3
Name: riX
Date: October 15, 2009 at 03:03:07 Pacific
Reply:

The fourth row should be
Set outlookItem = outlookApp.CreateItem(olTaskItem)
(I updated my first reply).

You will have to fill in the values for the dates etc.


0

Response Number 4
Name: KaviSam
Date: October 16, 2009 at 11:23:12 Pacific
Reply:

Hi Rix its still giving me the same error messgae.


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More






Use following form to reply to current message:

Login or Register to Reply
LoginRegister


Sponsored links

Ads by Google


Results for: VB macro to create a calendar appt. via excel

macro to create worksheet www.computing.net/answers/office/macro-to-create-worksheet/6153.html

Creating A Main Board in Excel www.computing.net/answers/office/creating-a-main-board-in-excel/8204.html

How to share a calendar www.computing.net/answers/office/how-to-share-a-calendar/2232.html