Outlook error studioX

I am getting the below error message when using outlook, does anyone have an idea how to fix that?

Hi @cornel.simons
Is it possible to share a redacted screenshot of your ‘Use Outlook Account’ card?

Hello,

I’ll start with the basic questions :smiley:

  • Can you please provide us with some logs : they are found in %localappdata%/UiPath/Logs
  • Can you please provide us with the version of the UiPath StudioX along with the mail package version :slightly_smiling_face:
  • Also it would be most helpfull if you could provide us with the Office version

Regards,
Dragos.

Also,

If you are using the latest release ( 20.10.x ) we added a tool that would allow us to repair corrupt registry entries ( your error 'kinda points to that :wink: ) . This is accessible from the tools menu

And it would bring up an interface that looks like this

There you can select the Outlook tab and give it a go :slight_smile:

Regards,
Dragos.

Thanks for your comment.

UiPath StudioX 2020.4.3
Microsoft Office 365 ProPlus 16.0.12527.21236
20.4.3

Message: Property accessor ‘Account’ on object ‘UiPath.Mail.Activities.Business.OutlookApplicationCard’ threw the following exception:‘Unable to cast COM object of type ‘Microsoft.Office.Interop.Outlook.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Outlook._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{00063001-0000-0000-C000-000000000046}’ failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155).’

Exception Type: System.Reflection.TargetInvocationException

RemoteException wrapping System.Reflection.TargetInvocationException: Property accessor ‘Account’ on object ‘UiPath.Mail.Activities.Business.OutlookApplicationCard’ threw the following exception:‘Unable to cast COM object of type ‘Microsoft.Office.Interop.Outlook.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Outlook._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{00063001-0000-0000-C000-000000000046}’ failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155).’ —> RemoteException wrapping System.InvalidCastException: Unable to cast COM object of type ‘Microsoft.Office.Interop.Outlook.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Outlook._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{00063001-0000-0000-C000-000000000046}’ failed due to the following error: Interface not registered (Exception from HRESULT: 0x80040155).
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
at Microsoft.Office.Interop.Outlook.ApplicationClass.get_Version()
at UiPath.Mail.OutlookAPI.InitOutlook()
at UiPath.Mail.Outlook.OutlookAccountWithStoreDetectionService.GetSelectedStoreDisplayName()
at UiPath.Mail.Activities.Business.OutlookApplicationCard.get_Account()
— End of inner exception stack trace —
at System.ComponentModel.ReflectPropertyDescriptor.GetValue(Object component)
at System.Activities.Activity.ReflectedInformation…ctor(Activity activity, ReflectedType reflectType)
at System.Activities.NativeActivity.CacheMetadata(NativeActivityMetadata metadata)
at System.Activities.NativeActivity.OnInternalCacheMetadata(Boolean createEmptyBindings)
at System.Activities.Activity.InternalCacheMetadata(Boolean createEmptyBindings, IList1& validationErrors) at System.Activities.ActivityUtilities.ProcessActivity(ChildActivity childActivity, ChildActivity& nextActivity, Stack1& activitiesRemaining, ActivityCallStack parentChain, IList1& validationErrors, ProcessActivityTreeOptions options, ProcessActivityCallback callback) at System.Activities.ActivityUtilities.ProcessActivityTreeCore(ChildActivity currentActivity, ActivityCallStack parentChain, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList1& validationErrors)
at System.Activities.ActivityUtilities.CacheRootMetadata(Activity activity, LocationReferenceEnvironment hostEnvironment, ProcessActivityTreeOptions options, ProcessActivityCallback callback, IList`1& validationErrors)
at System.Activities.Hosting.WorkflowInstance.ValidateWorkflow(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.Hosting.WorkflowInstance.RegisterExtensionManager(WorkflowInstanceExtensionManager extensionManager)
at System.Activities.WorkflowApplication.EnsureInitialized()
at System.Activities.WorkflowApplication.Enqueue(InstanceOperation operation, Boolean push)
at System.Activities.WorkflowApplication.SimpleOperationAsyncResult.Run(TimeSpan timeout)
at System.Activities.WorkflowApplication.BeginRun(AsyncCallback callback, Object state)
at UiPath.Executor.RobotRunner.d__88.MoveNext()

Thank you,

I have a different view with tools “project dependencies mass update tool”


Unfortunately the office repair tool is available in 20.10. We will investigate the issue and come back with a resolution :slight_smile:

Regards,
Dragos.

Hello,

So we talked and talked and we came to the conclusion that the easiest way to try and solve this issue is to provide you with the tool that we developed for 20.10 :slight_smile:

The Steps document is written for Excel but it’s the same procedure for Outlook ( or any of the other Office products that we support )

Looking forward for your feedback,
Dragos.

Steps.pdf (161.0 KB) OfficeExtensions.zip (42.5 KB)

What would be the solution with respect to Studio 2019.10.1?
Our error reads: (Note; it ends with TYPE_E_ELEMENTNOTFOUND)

Unable to cast COM object of type ‘Microsoft.Office.Interop.Outlook.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Outlook._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{00063001-0000-0000-C000-000000000046}’ failed due to the following error: Interface not registered (Exception from HRESULT: 0x8002802B (TYPE_E_ELEMENTNOTFOUND)

1 Like

Hello, you could try the steps described in my last post.

Regards,
Dragos.

Start Outlook in safe mode
In Windows 10, click Start.
Type Outlook /safe, in the Search programs and files and then click OK.
Close and re-open Outlook.
If the issue is resolved, you can keep working, or if you have time, take the following steps to find out what COM Add-in is causing the problem.

Regards,
Rachel Gomez