Public WithEvents myOlApp As Outlook.Application Sub Initialize_handler() Set myOlApp = Outlook.Application End Sub Private Sub myOlApp_NewMail() Dim myExplorers As Outlook.Explorers Dim myFolder As Outlook.Folder Dim x As Integer Set myExplorers = myOlApp.Explorers Set myFolder = myOlApp.GetNamespace("MAPI").GetDefaultFolder(olFolderInbox) If myExplorers.Count <> 0 Then For x = 1 To myExplorers.Count On Error GoTo skipif If myExplorers.Item(x).CurrentFolder.Name = "Inbox" Then myExplorers.Item(x).Display myExplorers.Item(x).Activate Exit Sub End If skipif: Next x End If On Error GoTo 0 myFolder.Display End Sub
All the question that scared me now i am trying to scare them .. so that they cant scare others :)
Tuesday, October 18, 2011
Application.NewMail Event
Subscribe to:
Post Comments (Atom)
Featured Posts
Open Hardware Monitor A Handy Tool for System Monitoring
#Open #Hardware #Monitor: A Handy Tool for #System #Monitoring #OpenHardwareMonitor is a free, #opensource #software designed to monitor t...
-
Configuration config = HBaseConfiguration.create(); Job job = new Job(config,"ExampleReadWrite"); job.setJarByClass(MyReadWriteJo...
-
Print numbers in order : #!/bin/bash for i in $(seq 0 4) do for j in $(seq $i -1 0) do echo -n $j done echo done Will gi...
No comments:
Post a Comment
Thank you for Commenting Will reply soon ......