FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for CA-Clipper Ole and Outlook
Posts: 22
Joined: Fri Nov 04, 2005 09:05 PM
Ole and Outlook
Posted: Wed Dec 21, 2005 02:56 PM

I try to use outlook with Ole and receive error message at runtime
UNDEFINED CREATE ITEM

Here is the code
* ===
procedure mole()
local ol,om,oatt
ol:=createoleobject("Outlook.Application")

om:=ol:CreateItem(0) THE ERROR IS HERE !!!!
om:Recipients:Add("jacquet@tiscali.be")
om:Subject:="Le sujet du test OLE"
om:Body:="Le message test OLE"
oatt:=om:attachments
oatt:add("c:\dmedi\test.doc")
om:send()

RETURN

Thanks for any help .
Philippe

Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: Ole and Outlook
Posted: Wed Dec 21, 2005 07:24 PM
I just tried to compile and run the following sample using pure xHarbour and got no error message:

FUNCTION MAIN()

    LOCAL oOutlook := CREATEOBJECT( "Outlook.Application" )

    oItem = oOutlook:CreateItem( 0 )

    RETURN NIL


EMG
Posts: 22
Joined: Fri Nov 04, 2005 09:05 PM
fivewin ole outlook
Posted: Thu Dec 22, 2005 08:08 AM

Thanks for this answer but i wanted to do it with FW 2.3 or 2.5
and i receive an compile error with the CREATEOBJECT instruction .

Thanks .

Philippe

Posts: 44162
Joined: Thu Oct 06, 2005 05:47 PM
Ole and Outlook
Posted: Thu Dec 22, 2005 08:11 AM

Philippe,

OCXs are 32 bits components.

We do recommend you to port your application to 32 bits using FiveWin for Harbour/xharbour. The 32 bits full integration will solve the problems you may find.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 9022
Joined: Thu Oct 06, 2005 08:17 PM
Re: fivewin ole outlook
Posted: Thu Dec 22, 2005 10:11 AM

Try replacing CREATEOBJECT() with TOleAuto():New(). But you will need of OLE2.LIB. And, as Antonio stated, I'm not sure it will work in 16 bit.

EMG

Continue the discussion