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
Ole and Outlook
-
- Posts: 22
- Joined: Fri Nov 04, 2005 9:05 pm
- Location: LIEGE Belgium
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: Ole and Outlook
I just tried to compile and run the following sample using pure xHarbour and got no error message:
EMG
Code: Select all
FUNCTION MAIN()
LOCAL oOutlook := CREATEOBJECT( "Outlook.Application" )
oItem = oOutlook:CreateItem( 0 )
RETURN NIL
-
- Posts: 22
- Joined: Fri Nov 04, 2005 9:05 pm
- Location: LIEGE Belgium
fivewin ole outlook
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
and i receive an compile error with the CREATEOBJECT instruction .
Thanks .
Philippe
- Antonio Linares
- Site Admin
- Posts: 37481
- Joined: Thu Oct 06, 2005 5:47 pm
- Location: Spain
- Contact:
- Enrico Maria Giordano
- Posts: 7355
- Joined: Thu Oct 06, 2005 8:17 pm
- Location: Roma - Italia
- Contact:
Re: fivewin ole outlook
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
EMG