FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Outlook Classic with OLE
Posts: 408
Joined: Sun Nov 06, 2005 03:55 PM
Outlook Classic with OLE
Posted: Wed Oct 29, 2025 08:08 PM

When I access outlook via OLE to send an email, and Outlook is not it seems to work fine. However if Outlook is launched and open on the desktop I cannot connect create the OLE object. Anybody run into this? I believe I am using GetActiveObject() first then on the try it uses CreateObject().

Thanks,

Thanks,

Byron Hopp

Matrix Computer Services
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Outlook Classic with OLE
Posted: Wed Oct 29, 2025 08:47 PM

Code? Example? Please show how you're doing it.

¿Código? ¿Ejemplo? Por favor, muestre cómo lo está haciendo.

Gracias, tks.

Regards, saludos.

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 408
Joined: Sun Nov 06, 2005 03:55 PM
Re: Outlook Classic with OLE
Posted: Thu Oct 30, 2025 03:00 PM

Sorry, Didn't get an email advise. This is how I am attempting to get the object.

Function GetOutlookObject()

// Same functionality of VBA's GetObject()

Local oOutlook := nil

Try

    oOutlook := GetActiveObject("Outlook.Application")

Catch

    oOutlook := CreateObject("Outlook.Application")

End

Return oOutlook

Thanks,

Byron Hopp

Matrix Computer Services
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: Outlook Classic with OLE
Posted: Thu Oct 30, 2025 03:06 PM
   WaitRun( "CMD /C TASKKILL.EXE /IM OutLook.exe /F", 0 )
Regards,saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 408
Joined: Sun Nov 06, 2005 03:55 PM
Re: Outlook Classic with OLE
Posted: Thu Oct 30, 2025 03:15 PM

I wasn't thinking that way at all. That sould work, good idea.

Thanks,

Byron Hopp

Matrix Computer Services

Continue the discussion