Word Activity Fails

I am importing text from captcha like window and need to save it to Word but getting below error.

RemoteException wrapping System.Exception: Error openning document,
make sure Word application is installed
at UiPath.Word.WordDocument…ctor(String documentPath,
Boolean createNew)
at UiPath.Word.Activities.WordApplicationScope.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance,
ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
BookmarkManager bookmarkManager,
Location resultLocation)

Any help?

You have MS office installed in your machine @Saurm21?

Kindly check with this
–if you have the word installed, then reinstall the UiPath.word.activities package again (if installed) and restart the studio before executing again
–still if this issues persists kindly uninstall and reinstall the studio
and try once

Cheers @Saurm21

Yes I have.

Will do and let you know.

Fine
@Saurm21

Now the error has changed.

RemoteException wrapping System.InvalidCastException: Unable to cast COM object of type ‘Microsoft.Office.Interop.Word.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.Word._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ’
{
00020970-0000-0000-C000-000000000046
}’ failed due to the following error: Library not registered. (Exception from HRESULT: 0x8002801D (TYPE_E_LIBNOTREGISTERED)).
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc,
IntPtr pCPCMD,
IntPtr& ppTarget,
Boolean& pfNeedsRelease)
at Microsoft.Office.Interop.Word.ApplicationClass.get_Documents()
at UiPath.Word.WordDocument…ctor(String documentPath,
Boolean createNew)
at UiPath.Word.Activities.WordApplicationScope.Execute(NativeActivityContext context)
at System.Activities.NativeActivity.InternalExecute(ActivityInstance instance,
ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor,
BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor,
BookmarkManager bookmarkManager,
Location resultLocation)

@Palaniyappan

Kindly perform once a “Repair” on MS Office installation and try once
for more info on this

cheers @Saurm21

Hi @Saurm21

If the issue is not fixed, please try this solution here:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.