|
-
Aug 1st, 2005, 07:19 PM
#1
Thread Starter
Fanatic Member
Event
Is there an event in Outlook 2000 and 2003 VBA that occurs when a Calendar Item is added, modified or deleted ?
-
Aug 1st, 2005, 11:41 PM
#2
Re: Event
Yes there are events for all three of your requested events. 
VB Code:
Option Explicit
Public WithEvents oCalFolder As Outlook.items
Private Sub Application_MAPILogonComplete()
Set oCalFolder = Application.GetNamespace("MAPI").GetDefaultFolder(olFolderCalendar).items
End Sub
Private Sub oCalFolder_ItemAdd(ByVal Item As Object)
MsgBox "Item: " & Item.Subject & " Added"
End Sub
Private Sub oCalFolder_ItemChange(ByVal Item As Object)
MsgBox "Item: " & Item.subjet & " Modified!"
End Sub
Private Sub oCalFolder_ItemRemove()
MsgBox "Item Deleted"
End Sub
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 2nd, 2005, 08:46 AM
#3
Thread Starter
Fanatic Member
Re: Event
It's not firing the event in Outlook 2003. Do I have to do something to activate the macro?
-
Aug 2nd, 2005, 09:59 AM
#4
Re: Event
Make sure you have macros enabled and log off and restart Outlook.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 2nd, 2005, 12:22 PM
#5
Thread Starter
Fanatic Member
Re: Event
What I want to do is when something is add to the personal calendar, it's copied to a public folder. But with these event, I can't do it perfectly. I don't know which one has been deleted and which one has been modified
-
Aug 2nd, 2005, 12:33 PM
#6
Re: Event
What do you mean? Item is passed in the Added and Changed events
VB Code:
Private Sub oCalFolder_ItemChange(ByVal [b]Item[/b] As Object)
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 2nd, 2005, 01:39 PM
#7
Thread Starter
Fanatic Member
Re: Event
In the change event, how can I find the original one in the public folder if it changed ?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|