Hello,my friends
I want to add an image or a chart of excel to a PPT.And I use the “Use PowerPoint Presentation”+“Add Image/Video to Slide” to add.But it throws an exception.
Next is my sequence and the exception message.
RemoteException wrapping UiPath.Presentations.PowerPointException: Cannot open PowerPoint —> RemoteException wrapping UiPath.Presentations.PowerPointException: Please make sure PowerPoint is installed —> RemoteException wrapping System.InvalidCastException: Unable to cast COM object of type ‘Microsoft.Office.Interop.PowerPoint.ApplicationClass’ to interface type ‘Microsoft.Office.Interop.PowerPoint._Application’. This operation failed because the QueryInterface call on the COM component for the interface with IID ‘{91493442-5A91-11CF-8700-00AA0060263B}’ failed due to the following error: 不支持此接口 (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
at System.StubHelpers.StubHelpers.GetCOMIPFromRCW(Object objSrc, IntPtr pCPCMD, IntPtr& ppTarget, Boolean& pfNeedsRelease)
at Microsoft.Office.Interop.PowerPoint.ApplicationClass.set_DisplayAlerts(PpAlertLevel DisplayAlerts)
at UiPath.Presentations.Helpers.PowerPointHelpers.StartNewApplication()
— End of inner exception stack trace —
at UiPath.Presentations.Helpers.PowerPointHelpers.StartNewApplication()
at UiPath.Presentations.Helpers.PowerPointInstanceManager.InternalComAppReferenceCountManager.StartNewApplication(Object startOptions)
at UiPath.Shared.ComAppReferenceCountManager`3.StartOrAttach(TComAppStartOptions startOptions, Boolean& wasAlreadyRunning)
at UiPath.Presentations.Helpers.PowerPointInstanceManager.StartOrAttach()
at UiPath.Presentations.PresentationApplicationFactory.AttachOrCreateNew(PresentationArguments arguments, IPowerPointInstanceManager appInstanceManager)
— End of inner exception stack trace —
at UiPath.Presentations.PresentationApplicationFactory.AttachOrCreateNew(PresentationArguments arguments, IPowerPointInstanceManager appInstanceManager)
at UiPath.Presentations.PresentationApplicationFactory.Create(Boolean attachOnly)
at UiPath.Presentations.Activities.PresentationQuickHandle.SafeGetPresentation(Boolean attachOnly)
at UiPath.Presentations.Activities.PowerPointApplicationScope.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)
It seems to be a problem of UsePowerpoint Presentation activity, not Add Image/Video to slide activity.
Can you check whether error occurs without Add Image/Video to slide activity?