I’ve put some C# code into an “Invoke Code” stage in order to open and modify a PowerPoint presentation.
Code works fine in Visual Studio 2019 after importing Microsoft.Office.Interop.Powerpoint.dll and office.dll, however in UiPath Studio it doesn’t have compiles error but when running the following exception is thrown:
error CS0012: The type ‘Microsoft.Office.Core.MsoTriState’ is defined in an assembly that is not referenced. Add refrence to assembly ‘office,
Version=15.0.0.0,
Culture=neutral,
PublicKeyToken=71e9bce111e9429c’.
In UiPath I imported Microsoft.Office.Interop.Powerpoint and Microsoft.Office.Core
thanks for the answer, I’ve tried to add Microsoft.Office.Core via assembly but the error remained.
I’ve finally been able to go on by performing the following steps:
Create a Custom Activity that used as reference both the “office” dll, which is found in the assembly folder;
Imported the activity into UiPath and reloaded the project.
Don’t know if there is a simpler way to import this dll but somehow this fixes my problem.