• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 192
  • Last Modified:

Outlook constrol

Hi

I want to make an application will be contected to my Outlook (running on the same PC), and will notify me when a reminder is pop up or I'm receiving an email

Is there such a control ?
Do you know a way I can do that ?

0
lirong
Asked:
lirong
  • 3
  • 2
  • 2
  • +4
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
??? can you clarify, please
Because, Outlook has already some "notification" possiblities for new mail:
* sound (check control panel, sound, find "new mail notification", choose sound file)
* mouse cursor change
* start program (you must define a rule for this)
For reminder, there is a message box for the reminders.

What do you need what outlook doesn't have?
0
 
lirongAuthor Commented:
OK. I want to create an application that will "listen and see" the Outlook's data. If, for example I'll recieve an email, my application will know that and will do something.
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
2 options:
* constantly running application
let your application get the instance of the running outlook, and getting it's events:
'in a form (or class module)
public withevents appOutlook as Outlook.Application
'you can now get some events from outlook, for example NewMail

* let your application be started by outlook's rule (see previous comment)

CHeers
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
vbDocCommented:
I have done this many times with MAPI. There is a great souce for this a www.planetsourcecode.com. Just search for 'Mapi Read Outlook' under the Visual Basic section.
Regards
0
 
Richie_SimonettiIT OperationsCommented:
<offtopic>
nice resume vbdoc, SP section the better
</offtopic>
0
 
vbDocCommented:
<offtopic>
Thanks, I get a lot of comments on it.
</offtopic>
0
 
thenrichCommented:
here is a code snipet i use in conjuction with outlook and a timer :

Option Explicit
Dim temp As Variant
Dim tmTime As Variant
Dim OutLookapp As Outlook.Application
Dim OutLookNS As Outlook.NameSpace
Dim Sentfldr As Outlook.MAPIFolder
Dim Deletefldr As Outlook.MAPIFolder
Dim InBoxfldr As Outlook.MAPIFolder
Dim MyItems As Outlook.Items
Dim Coll As Collection

Dim TempPath As String
Dim i As Integer
Dim i2 As Integer
Dim NewMsg As Outlook.MailItem
Dim wCount As Integer
Dim iCount As Integer
Dim coName As String
Private Sub cmdCancel_Click()
   Unload Me
End Sub


Private Sub Form_Load()
     Set OutLookapp = GetObject(, "OutLook.Application")
End Sub

Private Sub Timer1_Timer()
     
     For i = 0 To 975
        lblMessage.Width = i
     Next
         
    '' Associates variable to NameSpace
       Set OutLookNS = OutLookapp.GetNamespace("MAPI")

    '' Associates variable to an OutLook folders
       Set Sentfldr = OutLookNS.GetDefaultFolder(olFolderSentMail)
       Set Deletefldr = OutLookNS.GetDefaultFolder(olFolderDeletedItems)
       Set MyItems = OutLookNS.GetDefaultFolder(olFolderInbox).Items
       Set Coll = New Collection
       
        For i = 1 To MyItems.Count
           temp = Left(Trim(MyItems(i).Subject), 5)
           temp = Left(Trim(MyItems(i).Subject), 9)
           If Left(Trim(MyItems(i).Subject), 5) = "Read:" Or _
           Left(Trim(MyItems(i).Subject), 9) = "Not read:" Then
              Coll.Add MyItems(i)
           End If
        Next
               
        For i = 1 To Coll.Count
           Coll.Item(i).Delete
        Next
       
        If Sentfldr.Items.Count > 0 Then PB1.Max = Sentfldr.Items.Count
        For i = 1 To Sentfldr.Items.Count
           Sentfldr.Items(1).Delete
           PB1.Value = i
        Next
        PB1.Value = 0
        PB1.Refresh
       
        If Deletefldr.Items.Count > 0 Then PB1.Max = Deletefldr.Items.Count
        For i = 1 To Deletefldr.Items.Count
           Deletefldr.Items(1).Delete
           PB1.Value = i
        Next
        PB1.Refresh
        PB1.Value = 0
       
  lblMessage.Width = 0
  lblMessage.Refresh
End Sub
0
 
lirongAuthor Commented:
Will it work on reminders as well as incomming emails ?
0
 
lirongAuthor Commented:
What is PB1 ???
0
 
DanRollinsCommented:
Hi lirong,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will ask a Community Support Moderator to:

    Split points between: angelIII and thenrich

lirong, if you think your question was not answered at all or if you need help, just post a new comment here; Community Support will help you.  DO NOT accept this comment as an answer.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
SpideyModCommented:
per recommendation

SpideyMod
Community Support Moderator @Experts Exchange

angelIII points for you at:
http://www.experts-exchange.com/Programming/Programming_Languages/Visual_Basic/Q_20506490.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

  • 3
  • 2
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now