Hi All
I need to add my own visual basic 6.0 code when, in Outlook 2003 Calendar, a new element is created or modified. Someone can help me, please??
Please send me an e-mail to [email protected]
Thanks in advance :p
Printable View
Hi All
I need to add my own visual basic 6.0 code when, in Outlook 2003 Calendar, a new element is created or modified. Someone can help me, please??
Please send me an e-mail to [email protected]
Thanks in advance :p
Welcome to the Forums.
You shouldnt post your email addy as you will get spammed alot. Members can email you through your profile contact info. ;)
Are these Private or Public Calendar items?
I'm sorry for email,
regarding my request the Calendar Item is a Private Calendar Item.
Thanks in advance
You can create two events for the ItemsAdd and ItemsChange for the particular calendar folder. Then in the events you cna do whatever.
VB Code:
Public WithEvents MyCalendarItems As Outlook.Items Public WithEvents MyOlApp As Outlook.Application Private Sub Form_Load() Set MyOlApp = GetObject(, "Outlook.Application") Set MyCalendarItems = MyOlApp.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).Items End Sub Private Sub MyCalendarItems_ItemAdd(ByVal Item As Object) ' End Sub Private Sub MyCalendarItems_ItemChange(ByVal Item As Object) ' End Sub
Hi, I copy Your code and paste it in the Outlook VBA project simply changing Form_Load with Application_Startup but it doesn't run.
What I need is that when an element is created/opened must start my own code and when the item is saved another portion of my own code must be executed.
Please help me soon :-(
No, it shouldnt be pasted in Outlook VBA as you stated you needed it in VB6.
If you want to do it from VBA then make sure you have Macros enabled.
Thanks RobDog888 but perhaps I have not explained well my request:
when I made a double-click on calendar I had a new appointment item; well, I want to catch the exact moment that this appointment is created
Thanks in advance
Ok, then it may be the ItemAdd event but it doesnt fire until you save the item I believe.
The other option is to write a VB Script event in the appointment form itself. What do you need to do when the form is displayed?