-
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 :cool:
Thanx
Anil Arora
Shoot a mail to me if u want
Live, Love, Laugh
-
1 Attachment(s)
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
-
For NewMail, how can I read the new MailItem since it is not passed as parameter?
Would you help?
-
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