FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Outlook via ole
Posts: 858
Joined: Fri Oct 07, 2005 12:00 PM
Outlook via ole
Posted: Tue Jun 10, 2014 09:44 PM

Hi all.
I need to send emails through Microsoft Outlook and I'm using the following code.
The problem is that it needs Outlook already executed to run.

Do you have a ole code that open Outlook in case it isn't running ?
thank you


TRY

    oOutLook := TOleAuto():New("Outlook.Application")
    oMailItem := oOutLook:CreateItem( 0 )
    oRecip := oMailItem:Recipients
CATCH
    MsgStop("Outlook isn't running.","Attention")
    return(-1)
END
Best Regards,



Marco Turco

SOFTWARE XP LLP

Continue the discussion