OLE Errors

OLE Errors

Postby byron.hopp » Thu Aug 15, 2024 9:47 pm

My most popular error is involving OLE. See the error below:

Error occurred at: 08/15/24, 14:42:21
Error description: Error TOleAuto/-1 0x80080005: TOLEAUTO:NEW
Args:
[ 1] = C Outlook.Application
[ 2] = U
[ 3] = U

How can I check to eliminate this before it happens?

Thanks,
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: OLE Errors

Postby Lailton » Fri Aug 16, 2024 2:46 am

Can you try it?

Code: Select all  Expand view

try
    oOutlook := CREATEOBJECT("Outlook.Application")
catch
    oOutlook := nil
end

if hb_isObject( oOutlook )
    ? "ok"
else
    ? "err"
endif

 


:D
Regards,
Lailton Fernando Mariano
User avatar
Lailton
 
Posts: 153
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil

Re: OLE Errors

Postby byron.hopp » Fri Aug 16, 2024 4:49 am

Yes I will, Thanks,
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: OLE Errors

Postby byron.hopp » Fri Aug 16, 2024 4:24 pm

Why does it throw an error on the CreateObject line, is there a way to identify that?
If it does throw an error, what needs to be done to make it successful the next time?
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: OLE Errors

Postby karinha » Fri Aug 16, 2024 4:40 pm

Code: Select all  Expand view

   TRY

      oOutLook := GetActiveObject( "Outlook.Application" )

   CATCH

      TRY

         oOutLook := CREATEOBJECT("Outlook.Application")

      CATCH

         MsgInfo( "Outlook Is Not Available" )

         RETURN( .F. )

      END

   END

   // .AND. .OR.
   IF FWGetOleObject( "outlook.application" ) == nil

      MsgInfo( "Outlook Is Not Available" )

      RETURN NIL

   ELSE

      MsgInfo( "outlook is available" )

   ENDIF
 


Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: OLE Errors

Postby byron.hopp » Fri Aug 16, 2024 4:55 pm

This is the code I am currently using:

Function GetOutlookObject()
// Same functionality of VBA's GetObject()
Local oOutlook := nil
Try
oOutlook := GetActiveObject("Outlook.Application")
Catch
oOutlook := CreateObject("Outlook.Application")
End
Return oOutlook

My question is why is outlook not available, if this doesn't work, what do I tell the user to do to correct the issue?

Thanks,
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: OLE Errors

Postby Antonio Linares » Fri Aug 16, 2024 5:02 pm

You may tell the user to check if Outlook is installed on his pc
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: OLE Errors

Postby byron.hopp » Fri Aug 16, 2024 5:21 pm

Yes, this is the same PC every day, Outlook has been installed ever since the workstation was setup at the users desk. Typically outlook is running. I just don't have enough information to even begin to think why it is not working. Assuming that it is installed (and hopefully that nobody has uninstalled it), is there any kind of test that can be performed before I try GetActiveObject or CreateObject to insure success? By the way, it works most of the time, my error system using Outlook to send me an email with a copy of the error, after it gets the error on the try and throw's an error, the error system is able to open outlook and send the error message to me. I just don't know why it didn't work on the first try at the start of this whole process.
Thanks,
Byron Hopp
Matrix Computer Services
byron.hopp
 
Posts: 382
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA

Re: OLE Errors

Postby karinha » Fri Aug 16, 2024 7:11 pm

Is outlook set as the DEFAULT E MAIL SENDER? Manually, is it sending correctly?

Regards, saludos.
João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
User avatar
karinha
 
Posts: 7824
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: OLE Errors

Postby Jimmy » Sat Aug 17, 2024 4:46 am

hi,

i would re-Install Outlook when get OLE Error.
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1732
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: OLE Errors

Postby driessen » Sun Aug 18, 2024 8:31 am

Hello everyone,

So now or then, I experience OLE-errors after an update of Microsoft 365 has been installed.

The problem usually disappears when I perform a small repair of Microsoft 365.
Regards,

Michel D.
Genk (Belgium)
_____________________________________________________________________________________________
I use : FiveWin for (x)Harbour v. 24.07 - Harbour 3.2.0 (February 2024) - xHarbour Builder (January 2020) - Bcc773
User avatar
driessen
 
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 65 guests