1. Luis Pesaressi
  2. PowerBuilder
  3. Wednesday, 14 September 2022 05:56 AM UTC

Hi try the send email via outlook with OLEobject

 

lOle_Outlook = CREATE OLEObject
lOle_Outlook_Item = CREATE OLEObject
lOle_Outlook_Item_Attach = CREATE OLEObject
li_Create = lOle_Outlook.ConnectToNewObject( ls_OutlookCurVer )
lOle_Outlook_Item = lOle_Outlook.CreateItem( 0 )

 

but return li_Create error -3 this is when outlook application is open, when I cose outlook application work fine

somebody knows why

 

thanks

 

Luis

Miguel Leeuwe Accepted Answer Pending Moderation
  1. Thursday, 15 September 2022 04:29 AM UTC
  2. PowerBuilder
  3. # 1

Hi,

What's the value of "ls_OutlookCurVer"?

Comment
  1. Luis Pesaressi
  2. Thursday, 15 September 2022 10:07 AM UTC
Hi

the value is "Outlook.Application.16"



but the PC of user have any version of outlook



Luis
  1. Helpful
  1. Miguel Leeuwe
  2. Thursday, 15 September 2022 11:26 AM UTC
Leave out the ".16" part of the string. You should be pointed automatically to the correct version without you specifying it explicitly. So use "Outlook.Applicatoin" and then see what happens.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 14 September 2022 20:22 PM UTC
  2. PowerBuilder
  3. # 2

Hi Luis;

  I have no idea but I have heard of this issue before on some Outlook versions in the past.

  The workaround could be to use the FindWindowW() SDK call to locate the Outlook App instance and the MS-Windows handle received from that call and then use the PB built-in SEND() command to send a "CloseWindow" request to the running Outlook instance before opening up a new OLE session. Food for thought.

Regards ... Chris

Comment
  1. Luis Pesaressi
  2. Thursday, 15 September 2022 00:58 AM UTC
HI,

yes, I see many posts over this problem but any solutions



Luis
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.