C#中的Powerpoint加载项应用程序,需要访问演示文稿所有者的详细信息

我必须用c#编写一个Powerpoint加载项应用程序,该应用程序可以连接到OneDrive,然后上传文件并从Onedrive检索文件,还需要获取演示文稿所有者详细信息和共享详细信息(其他用户权限,可以编辑或阅读)仅)。我检查了系统环境变量,但在我的机器上找不到任何东西。如何以编程方式执行此操作?我在网上搜索,但找不到任何东西。 请帮助我如何解决此类要求。.

jeseca8897 回答:C#中的Powerpoint加载项应用程序,需要访问演示文稿所有者的详细信息

您可以尝试使用OpenFileDialog和SaveFileDialog读取/写入Powerpoint文件

using (OpenFileDialog openFileDialog = new OpenFileDialog())
{
    openFileDialog.InitialDirectory = "OneDrive";
    openFileDialog.Filter = "pptx files (*.pptx)|*.pptx|All files (*.*)|*.*";
    openFileDialog.FilterIndex = 2;
    openFileDialog.RestoreDirectory = true;

    if (openFileDialog.ShowDialog() == DialogResult.OK)
    {
       //Read the contents of the file into a stream
       var fileStream = openFileDialog.OpenFile();
       // Do your stuff   
    }
}
本文链接:https://www.f2er.com/2963525.html

大家都在问