Unable to work with word application scope activity

Below issue coming

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
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)

1 Like

Hi @Nitin1861

This could help you…kindly check point edited by Marvin_Guo
https://social.msdn.microsoft.com/Forums/vstudio/en-US/d34c4f78-46f3-478e-9c44-95ea8461e46f/unable-to-cast-com-object-of-office-interop-word?forum=vsto

Thats what even we had in our UiPath

Kindly try this and let know…
Cheers @Nitin1861

1 Like

hi @Palaniyappan above issue with word application scope activity is resolved from your solution but now one more issue coming with Export to Pdf activity .
Below issue details

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
System.Runtime.InteropServices.COMException: Command failed
at UiPath.Word.Activities.WordInteropActivity.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Hmm try to uninstall pdf and word related activities and reinstall again and try
Thats would work @Nitin1861
Kindly try this and let know
Cheers @Nitin1861

hi @Palaniyappan this is not working still same issue coming on export to pdf activity
Actually my version registry key is 8.4