FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour OLE Errors
Posts: 408
Joined: Sun Nov 06, 2005 03:55 PM
OLE Errors
Posted: Thu Aug 15, 2024 09: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
Posts: 231
Joined: Fri Jul 20, 2012 01:49 AM
Re: OLE Errors
Posted: Fri Aug 16, 2024 02:46 AM
Can you try it?
Code (fw): Select all Collapse
try
    oOutlook := CREATEOBJECT("Outlook.Application")
catch
    oOutlook := nil
end

if hb_isObject( oOutlook )
    ? "ok"
else
    ? "err"
endif
:D
Regards,

Lailton Fernando Mariano
Posts: 408
Joined: Sun Nov 06, 2005 03:55 PM
Re: OLE Errors
Posted: Fri Aug 16, 2024 04:49 AM

Yes I will, Thanks,

Thanks,

Byron Hopp

Matrix Computer Services
Posts: 408
Joined: Sun Nov 06, 2005 03:55 PM
Re: OLE Errors
Posted: Fri Aug 16, 2024 04: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
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: OLE Errors
Posted: Fri Aug 16, 2024 04:40 PM
Code (fw): Select all Collapse
   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
Posts: 408
Joined: Sun Nov 06, 2005 03:55 PM
Re: OLE Errors
Posted: Fri Aug 16, 2024 04: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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: OLE Errors
Posted: Fri Aug 16, 2024 05:02 PM

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

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 408
Joined: Sun Nov 06, 2005 03:55 PM
Re: OLE Errors
Posted: Fri Aug 16, 2024 05: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
Posts: 8515
Joined: Tue Dec 20, 2005 07:36 PM
Re: OLE Errors
Posted: Fri Aug 16, 2024 07: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
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: OLE Errors
Posted: Sat Aug 17, 2024 04:46 AM

hi,

i would re-Install Outlook when get OLE Error.

greeting,

Jimmy
Posts: 1467
Joined: Mon Oct 10, 2005 11:26 AM
Re: OLE Errors
Posted: Sun Aug 18, 2024 08: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. 25.12 - Harbour 3.2.0 (May 2025) - xHarbour Builder (January 2020) - Bcc773

Continue the discussion