OLE Errors

Post Reply
byron.hopp
Posts: 388
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

OLE Errors

Post by byron.hopp »

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
User avatar
Lailton
Posts: 156
Joined: Fri Jul 20, 2012 1:49 am
Location: Brazil
Contact:

Re: OLE Errors

Post by Lailton »

Can you try it?

Code: Select all | Expand

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

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

 
:D
Regards,
Lailton Fernando Mariano
byron.hopp
Posts: 388
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: OLE Errors

Post by byron.hopp »

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

Re: OLE Errors

Post by byron.hopp »

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
User avatar
karinha
Posts: 7884
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: OLE Errors

Post by karinha »

Code: Select all | Expand

   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
byron.hopp
Posts: 388
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: OLE Errors

Post by byron.hopp »

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
User avatar
Antonio Linares
Site Admin
Posts: 42256
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: OLE Errors

Post by Antonio Linares »

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

Antonio Linares
www.fivetechsoft.com
byron.hopp
Posts: 388
Joined: Sun Nov 06, 2005 3:55 pm
Location: Southern California, USA
Contact:

Re: OLE Errors

Post by byron.hopp »

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
User avatar
karinha
Posts: 7884
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil
Contact:

Re: OLE Errors

Post by karinha »

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
Jimmy
Posts: 1733
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: OLE Errors

Post by Jimmy »

hi,

i would re-Install Outlook when get OLE Error.
greeting,
Jimmy
User avatar
driessen
Posts: 1422
Joined: Mon Oct 10, 2005 11:26 am
Location: Genk, Belgium

Re: OLE Errors

Post by driessen »

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
Post Reply