Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #2548 > unrolled thread
| Started by | Designer <designer1340@gmail.com> |
|---|---|
| First post | 2011-12-03 04:15 -0800 |
| Last post | 2011-12-05 08:33 -0800 |
| Articles | 8 — 3 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
Call Outlook 2007-2010 from a VO2.5 app Designer <designer1340@gmail.com> - 2011-12-03 04:15 -0800
Re: Call Outlook 2007-2010 from a VO2.5 app dlzc <dlzc1@cox.net> - 2011-12-03 08:13 -0800
Re: Call Outlook 2007-2010 from a VO2.5 app Designer <designer1340@gmail.com> - 2011-12-03 09:38 -0800
Re: Call Outlook 2007-2010 from a VO2.5 app dlzc <dlzc1@cox.net> - 2011-12-03 10:50 -0800
Re: Call Outlook 2007-2010 from a VO2.5 app Designer <designer1340@gmail.com> - 2011-12-03 23:59 -0800
Re: Call Outlook 2007-2010 from a VO2.5 app "andrej Terkaj" <aterkaj@task.si> - 2011-12-04 12:22 +0100
Re: Call Outlook 2007-2010 from a VO2.5 app Designer <designer1340@gmail.com> - 2011-12-04 09:53 -0800
Re: Call Outlook 2007-2010 from a VO2.5 app Designer <designer1340@gmail.com> - 2011-12-05 08:33 -0800
| From | Designer <designer1340@gmail.com> |
|---|---|
| Date | 2011-12-03 04:15 -0800 |
| Subject | Call Outlook 2007-2010 from a VO2.5 app |
| Message-ID | <510b85ce-0660-457a-9ed5-33bc86749280@o9g2000vbc.googlegroups.com> |
Hi,
I'm new in this group. I've a very small but annoying problem.
I would like to call Outlook (not Outlook Express) from a VO2.5 b-3
app
This is the code I wrote.
METHOD PB_Call( ) CLASS W_EMAIL
LOCAL oOutlook AS OBJECT
LOCAL oItem AS OBJECT
oOutlook := OLEAutoobject{"Outlook.Application"}
oItem := oOutlook:CreateItem(0)
IVarPut(oItem, #TO, "designer1340@gmail.com")
oItem:Cc := "designer1340@gmail.com"
oItem:Bcc := "designer1340@gmail.com"
oItem:Body := "Body text"
oItem:Display()
RETURN NIL
It opens Outllook, create a new message, put everything in place :)
But then, crash the VO-App with the the following message on the
oItem:Display() line
Error message:
--------------
Error Code: Method invocation failed (0x00000001)
Subsystem: OLE Automation Client
Function: OLEAUTOOBJECT:__INVOKEMETHOD
Description: Method invocation failed (0x00000001)
CallStack:
W_EMAIL:PB_CALL (Line: 12)
APP:START (Line: 9)
Can someone help ?
If you write me at the above e-mail address, I can send you a test app
as attached piece to illustrate the problem.
Thanks in advance.
[toc] | [next] | [standalone]
| From | dlzc <dlzc1@cox.net> |
|---|---|
| Date | 2011-12-03 08:13 -0800 |
| Message-ID | <63c29c62-15d1-44b7-8d71-debfc16f1275@v5g2000yqn.googlegroups.com> |
| In reply to | #2548 |
Dear Designer: On Dec 3, 5:15 am, Designer <designer1...@gmail.com> wrote: ... > oItem:Display() ... > It opens Outllook, create a new message, put > everything in place :) > > But then, crash the VO-App with the the following > message on the oItem:Display() line ... > Error Code: Method invocation failed (0x00000001) ... > Can someone help ? http://groups.google.com/group/comp.lang.clipper.visual-objects/msg/bd9a0b5171e2f96b ... click on 'More Options' then 'View thread', as he "forgot something", supplied at post #8. David A. Smith
[toc] | [prev] | [next] | [standalone]
| From | Designer <designer1340@gmail.com> |
|---|---|
| Date | 2011-12-03 09:38 -0800 |
| Message-ID | <3ab4d7df-b6c7-4506-b9ed-c134a2d6adbb@i6g2000vbe.googlegroups.com> |
| In reply to | #2549 |
On 3 déc, 17:13, dlzc <dl...@cox.net> wrote: > Dear Designer: > > On Dec 3, 5:15 am, Designer <designer1...@gmail.com> wrote: > ... > > > oItem:Display() > ... > > It opens Outllook, create a new message, put > > everything in place :) > > > But then, crash the VO-App with the the following > > message on the oItem:Display() line > ... > > Error Code: Method invocation failed (0x00000001) > ... > > Can someone help ? > > http://groups.google.com/group/comp.lang.clipper.visual-objects/msg/b... > ... click on 'More Options' then 'View thread', as he "forgot > something", supplied at post #8. > > David A. Smith Thanks David, I've read everything, try many of them, but still have my problem. I guess it's a little thing to change but didn't find it until now. Designer
[toc] | [prev] | [next] | [standalone]
| From | dlzc <dlzc1@cox.net> |
|---|---|
| Date | 2011-12-03 10:50 -0800 |
| Message-ID | <612b6622-6b70-4ee3-8f47-f7967fc845d3@h5g2000yqk.googlegroups.com> |
| In reply to | #2550 |
Dear Designer: On Dec 3, 10:38 am, Designer <designer1...@gmail.com> wrote: ... > I've read everything, try many of them, but > still have my problem. I guess it's a little > thing to change but didn't find it until now. The method close(n) is invoked before the method display(), in that example. Did you try that? David A. Smith
[toc] | [prev] | [next] | [standalone]
| From | Designer <designer1340@gmail.com> |
|---|---|
| Date | 2011-12-03 23:59 -0800 |
| Message-ID | <2def0ea2-a25f-422c-9d5c-4e4862b9b329@y12g2000vba.googlegroups.com> |
| In reply to | #2551 |
On 3 déc, 19:50, dlzc <dl...@cox.net> wrote:
> Dear Designer:
>
> On Dec 3, 10:38 am, Designer <designer1...@gmail.com> wrote:
> ...
>
> > I've read everything, try many of them, but
> > still have my problem. I guess it's a little
> > thing to change but didn't find it until now.
>
> The method close(n) is invoked before the method display(), in that
> example. Did you try that?
>
> David A. Smith
Hi David,
Thanks for your efforts and your kindness.
This is the code I've tried just now.
METHOD PB_Call( ) CLASS W_EMAIL
LOCAL oOutlook AS OBJECT
LOCAL oItem AS OBJECT
oOutlook := OLEAutoobject{"Outlook.Application"}
oItem := oOutlook:CreateItem(0)
IVarPut(oItem, #TO, "dagobert87hotmail.com")
oItem:Cc := "dagobert87@hotmail.com"
oItem:Bcc := "dagobert87@hotmail.com"
oItem:Subject := "Message topic"
oItem:Body := "Body text"
oItem:Close(0)
oItem:Display()
RETURN NIL
But the error remains. I'm very sorry to see that the VO-App executes
the Display() correctly but then crashes. Does Display() needs some
additional parameters ?
Designer
[toc] | [prev] | [next] | [standalone]
| From | "andrej Terkaj" <aterkaj@task.si> |
|---|---|
| Date | 2011-12-04 12:22 +0100 |
| Message-ID | <jbfl4t$ig0$1@news.siol.net> |
| In reply to | #2552 |
Hi !
There is no error in your code in an environment :VO 2.8 SP2 and outlook
2007. You forgot a @ char in your IVarPut(), but this little mistake has no
influence in processing oleautoObject. Check also a version of mapi32.dll
I think that a problem that you have lies in incompatible VO2.5 and
Office. Young and strong man would not like to marriage an old and
abandoned lady.
In an unknown environments (my client's PC ) I usually add a few lines like:
// Init outlook object dwVer = 12 for Outlook 2007 , dWVer = 11 for Outlook
2003
oOutlook := OLEAutoObject{"Outlook.Application"}
// oOutlook := OLEAutoObject{"Outlook.Application.12"}
dwVer := Val(SubStr(oOutlook:Version,1,At(".",oOutlook:Version) -1))
IF oOutlook <> NULL_OBJECT .AND. oOutlook:fInit
IF dwVer = 12
oOutlook:Destroy()
TextBox{,"eRROR","Outlook 2007 NOT SUPPORTED!"}:Show()
// Send_SMTPMail(aEmailAdresses,cSubject,cText ) --> I think that
2.5 does not support SMTP
ELSE
TextBox{,"ERROR","MS Outlook does not exist!"}:Show()
ENDIF
Best regards
Andrej
"Designer" <designer1340@gmail.com> wrote in message
news:2def0ea2-a25f-422c-9d5c-4e4862b9b329@y12g2000vba.googlegroups.com...
On 3 déc, 19:50, dlzc <dl...@cox.net> wrote:
> Dear Designer:
>
> On Dec 3, 10:38 am, Designer <designer1...@gmail.com> wrote:
> ...
>
> > I've read everything, try many of them, but
> > still have my problem. I guess it's a little
> > thing to change but didn't find it until now.
>
> The method close(n) is invoked before the method display(), in that
> example. Did you try that?
>
> David A. Smith
Hi David,
Thanks for your efforts and your kindness.
This is the code I've tried just now.
METHOD PB_Call( ) CLASS W_EMAIL
LOCAL oOutlook AS OBJECT
LOCAL oItem AS OBJECT
oOutlook := OLEAutoobject{"Outlook.Application"}
oItem := oOutlook:CreateItem(0)
IVarPut(oItem, #TO, "dagobert87hotmail.com")
oItem:Cc := "dagobert87@hotmail.com"
oItem:Bcc := "dagobert87@hotmail.com"
oItem:Subject := "Message topic"
oItem:Body := "Body text"
oItem:Close(0)
oItem:Display()
RETURN NIL
But the error remains. I'm very sorry to see that the VO-App executes
the Display() correctly but then crashes. Does Display() needs some
additional parameters ?
Designer
[toc] | [prev] | [next] | [standalone]
| From | Designer <designer1340@gmail.com> |
|---|---|
| Date | 2011-12-04 09:53 -0800 |
| Message-ID | <6a8ba966-5def-43fb-bdb2-176c04ba8184@c13g2000vbh.googlegroups.com> |
| In reply to | #2553 |
On 4 déc, 12:22, "andrej Terkaj" <ater...@task.si> wrote:
> Hi !
>
> There is no error in your code in an environment :VO 2.8 SP2 and outlook
> 2007. You forgot a @ char in your IVarPut(), but this little mistake has no
> influence in processing oleautoObject. Check also a version of mapi32.dll
> I think that a problem that you have lies in incompatible VO2.5 and
> Office. Young and strong man would not like to marriage an old and
> abandoned lady.
> In an unknown environments (my client's PC ) I usually add a few lines like:
>
> // Init outlook object dwVer = 12 for Outlook 2007 , dWVer = 11 for Outlook
> 2003
> oOutlook := OLEAutoObject{"Outlook.Application"}
>
> // oOutlook := OLEAutoObject{"Outlook.Application.12"}
>
> dwVer := Val(SubStr(oOutlook:Version,1,At(".",oOutlook:Version) -1))
>
> IF oOutlook <> NULL_OBJECT .AND. oOutlook:fInit
>
> IF dwVer = 12
>
> oOutlook:Destroy()
>
> TextBox{,"eRROR","Outlook 2007 NOT SUPPORTED!"}:Show()
>
> // Send_SMTPMail(aEmailAdresses,cSubject,cText ) --> I think that
> 2.5 does not support SMTP
>
> ELSE
>
> TextBox{,"ERROR","MS Outlook does not exist!"}:Show()
>
> ENDIF
>
> Best regards
>
> Andrej
Hi Andrej,
Thanks for your information. MAPI32.dll is from 2008 and Outlook is
2007. I've also tried on Outlook 2003 but got the same result. I
think, as you said, the marriage is wrong, but I had some hope. I hope
my client will accept soon to upgrade the app so I can run it with
Vulcan and get rid of this problem, but as for today it's not the
case.
Have a nice day,
Designer
[toc] | [prev] | [next] | [standalone]
| From | Designer <designer1340@gmail.com> |
|---|---|
| Date | 2011-12-05 08:33 -0800 |
| Message-ID | <846a2465-df71-44db-bb22-a281e9354ace@j10g2000vbe.googlegroups.com> |
| In reply to | #2554 |
Hi, I would like to thank all of you for your kind help. Special notice to Marc Verkade who inspire me the tip. In fact, this code works with a VO 2.5b-3... if your run Outlook 2010 with W7. I guess the glitch was in Outlook 2003 and 2007. Have a nice day, Designer
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web