viernes, 20 de julio de 2007

Automation sending email

Product : Microsoft Office Suite.
Part Involved : Excel
Summary: Monitoring process involved to send notifications in the same moment that the event has been detected..
Scenario : After the event has been triggered using VBA programming code enviroment is used to send a warn message by email to chief supervisor.
Company : Ministry of Health of Peru (MINSA).
Reference Date : March 2007.


Develop programming code VBA brings a intesting integration tool because the entire Office Suite (Access, Excel, Word, Power Point, OutLook itself) can be connected to the programmed VBA code developed and use as instance every resource available into Office as input data for our programming code to fire the event desired (in this case -send an email-). The exception is : only works up to office 2000, after that Microsoft inserted into office suite a security issue where it forbids a third party vendor use this plattaform as base to launch emails. The same restriction is applied when the interchange information between every office suite is used. But there is another type of executable file that handle client email functions that I will take in additionally topic. Next example works nice but up to Office 2000

Dim Uno As Object
Set Uno = CreateObject("Outlook.application")
Set Dos = Uno.GetNameSpace("MAPI")
Set Tres = Uno.CreateItem(0)
Tres.To = "germanmedinavirtual@gmail.com"
Tres.Subject = "Summary " + Str(hoy)
Tres.Body = Message
Tres.Send

Set Uno = Nothing: Set Dos = Nothing: Set Tres = Nothing:

No hay comentarios: