MsoTriState is ambiguous in the namespace Microsoft.Office.Core

Hello,
I want to read Powerpoint with a c# code. There are MsoTrue and MsoFalse types in the code. Therefore, I will put 2 variables of type MsoTriState in the invoke code.
I wrote Microsoft.Office.Core.MsoTriState.msoTrue as variable value, but I get the warning in the picture.

My xaml file contains Microsoft.Office.Core and Microsoft.Office.Interop.Powerpoint.

Can you help, I can’t find the solution for this for a long time?

By the way, I added the MsoTriState data type as follows.
DataType

Can you show us the dependencies like:
grafik

was any balareva / other office relateted packages also referenced?

FYI
grafik

Hello;

Dependencies in that;
Dependencies

For security reasons, I cannot use individual packages. :frowning_face:
Thank you.

Hello,
can you help? I still haven’t been able to solve the problem.

can you show us your imprted namespaces (import panel). Thanks

Hi @258b68b4092270201fa0f6a77,

As @ppr said, you have to import the correct namespaces.

var FullFilePath= InputFullFilepath;
var app = new Microsoft.Office.Interop.PowerPoint.Application();
var ppt = app.Presentations.Open(FullFilePath, WithWindow: Microsoft.Office.Core.MsoTriState.msoTrue);

Sample file: MsoTriState.xaml (5.5 KB)