Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Anybody got a clue on this?
Message
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00534668
Message ID:
00534948
Views:
12
>Hi!
>
>I got following sample for NewMail event from the Outlook 2000 help file:
>
>
>Dim WithEvents myOlApp As Outlook.Application
>
>Sub Initialize_handler()
>    Set myOlApp = CreateObject("Outlook.application")
>End Sub
>
>Private Sub myOlApp_NewMail()
>    Dim myExplorers As Outlook.Explorers
>    Dim myFolder As Outlook.MAPIFolder
>    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
>
>
>
>I guess it can help you.


Thanks Vlad!
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform