Home > Blockchain >  How do I work with a PowerPoint presentation using Visual Studio C#?
How do I work with a PowerPoint presentation using Visual Studio C#?

Time:12-15

I'm getting the error shown at the bottom.

I've created a Console App targeting .NET 7.0
I've installed the Microsoft.Office.Interop.PowerPoint package

Here's the code:

using Microsoft.Office.Interop.PowerPoint;
Console.WriteLine("Hello from PowerPointShuffler!");
Application pptApp = new Application();
Console.WriteLine("Bye from PowerPointShuffler!");

The compiles without error, but with this warning:

Warning MSB3305 Processing COM reference "Microsoft.Office.Core" from path "C:\Program Files\Microsoft Office\Root\VFS\ProgramFilesCommonX64\Microsoft Shared\OFFICE16\MSO.DLL". Type library importer encountered a property getter 'Type' on type 'Microsoft.Office.Core.SeriesGradientStopColorFormat' without a valid return type. The importer will attempt to import this property as a method instead.

I'm using the PowerPoint that comes with a Microsoft 365 Subscription.

Visual Studio error message

CodePudding user response:

Trying to create a project using .Net Framework 4.8 produces no errors or warnings.

enter image description here

  • Related