Results 1 to 4 of 4

Thread: OUTLOOKing problem

  1. #1

    Thread Starter
    Addicted Member eanilarora's Avatar
    Join Date
    Aug 2000
    Location
    Malaysia
    Posts
    179

    Question OUTLOOKing problem

    Hi Everybody

    Can anybody help me on the following query :

    I want to create a background routine in VB which traps events of Microsoft Outlook (e.g Sending of a Mail, Task, Appointment, etc)...

    The purpose of it is to store the Sent emails in a seperate Database... If anyone can suggest some other way, then also it will be great

    Thanx

    Anil Arora
    Shoot a mail to me if u want

    Live, Love, Laugh

  2. #2
    appi101
    Guest
    Hi

    Well the trick would be to find out when outlook is launched and then run the following code

    dim withevents ol as outlook.application
    set ol = getobject("Outlook.Application.9")
    then you can use the standard events which are provided with the outlook object.

    I've included a form which tries to do this but I cannot find out when outlook is launched. This will work only if Outlook is running.


    Otherwise what you can do is use VBA i.e. create macros to do the job. Ex.

    When Outlook is running goto tools>Macros>Visual Basic Editor

    When the Visual Basic Editor (VBE) is open in the project explorer window double click on Thisoutlooksession. It will offer to you the same events as the application does i.e. ItemSend, Startup, NewMail, Quit etc.

    Hope this helps

    Appi
    Attached Files Attached Files

  3. #3
    vking
    Guest
    For NewMail, how can I read the new MailItem since it is not passed as parameter?

    Would you help?

  4. #4
    appi101
    Guest
    Hi

    I dont know how to get the mailitem. Its not givenas an argument so I dont know. I've wondered about that too. If you find out do send me an email.

    Appi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width