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

问题描述 投票:1回答:1

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

c# asp.net .net-core powerpoint onedrive
1个回答
0
投票

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

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

    if (openFileDialog.ShowDialog() == DialogResult.OK)
    {
       // Do your stuff   
    }
}
© www.soinside.com 2019 - 2024. All rights reserved.