Ole and Outlook

Ole and Outlook

Postby jacquet philippe » Wed Dec 21, 2005 2: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
jacquet philippe
 
Posts: 22
Joined: Fri Nov 04, 2005 9:05 pm
Location: LIEGE Belgium

Re: Ole and Outlook

Postby Enrico Maria Giordano » Wed Dec 21, 2005 7:24 pm

I just tried to compile and run the following sample using pure xHarbour and got no error message:

Code: Select all  Expand view  RUN
FUNCTION MAIN()

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

    oItem = oOutlook:CreateItem( 0 )

    RETURN NIL


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

fivewin ole outlook

Postby jacquet philippe » Thu Dec 22, 2005 8: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
jacquet philippe
 
Posts: 22
Joined: Fri Nov 04, 2005 9:05 pm
Location: LIEGE Belgium

Postby Antonio Linares » Thu Dec 22, 2005 8: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
User avatar
Antonio Linares
Site Admin
 
Posts: 42118
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: fivewin ole outlook

Postby Enrico Maria Giordano » 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
User avatar
Enrico Maria Giordano
 
Posts: 8718
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for CA-Clipper

Who is online

Users browsing this forum: No registered users and 15 guests