R
Ran Avraham
Hi all!
I want to be able to send email through Outlook by using VBA commands.
My code is written in PowerBuilder (ver10 b5064) and I have Windows 2000
sp4.
When I connect to Outlook 2003/XP there is no problem whatsoever.
However, on Outlook2000 sp3 I get an error on the 'Send' function in the
code.
That made me realize, the problem is in Outlook and not in my code.
I did a research - I created a newly installed computer with no Office on
it.
I installed the original Office2000 version, and tried my code - it
worked!
Then I installed SR-1 version, and afterwards sp2, and in both cases the
code still worked fine with no errors.
But, after I installed sp3 (with all the up-to-date fixes) - the error
appeared!
Can anyone tell me what happened in sp3 that prevent me from using my
code?
this is my PB code:
oleobject loo_ol_msg_cast, loo_ol_app
int li_rc
loo_ol_app = create oleobject
li_rc = loo_ol_app.ConnectToNewObject ("Outlook.Application")
if li_rc <> 0 then return //connection failed
loo_ol_msg_cast = loo_ol_app.CreateItem(0)
if IsNull (loo_ol_msg_cast) then return
loo_ol_msg_cast.to = "name@domaim" //valid email address
loo_ol_msg_cast.Subject = "subject line"
loo_ol_msg_cast.Body = "message text"
loo_ol_msg_cast.send () //on this line I get the error
loo_ol_msg_cast.disconnectobject ()
loo_ol_app.disconnectobject ()
TIA
Ran.
I want to be able to send email through Outlook by using VBA commands.
My code is written in PowerBuilder (ver10 b5064) and I have Windows 2000
sp4.
When I connect to Outlook 2003/XP there is no problem whatsoever.
However, on Outlook2000 sp3 I get an error on the 'Send' function in the
code.
That made me realize, the problem is in Outlook and not in my code.
I did a research - I created a newly installed computer with no Office on
it.
I installed the original Office2000 version, and tried my code - it
worked!
Then I installed SR-1 version, and afterwards sp2, and in both cases the
code still worked fine with no errors.
But, after I installed sp3 (with all the up-to-date fixes) - the error
appeared!
Can anyone tell me what happened in sp3 that prevent me from using my
code?
this is my PB code:
oleobject loo_ol_msg_cast, loo_ol_app
int li_rc
loo_ol_app = create oleobject
li_rc = loo_ol_app.ConnectToNewObject ("Outlook.Application")
if li_rc <> 0 then return //connection failed
loo_ol_msg_cast = loo_ol_app.CreateItem(0)
if IsNull (loo_ol_msg_cast) then return
loo_ol_msg_cast.to = "name@domaim" //valid email address
loo_ol_msg_cast.Subject = "subject line"
loo_ol_msg_cast.Body = "message text"
loo_ol_msg_cast.send () //on this line I get the error
loo_ol_msg_cast.disconnectobject ()
loo_ol_app.disconnectobject ()
TIA
Ran.