2

I have to write an Powerpoint Add-In Application in c# that can connect to OneDrive and then uploads file and retrieve files from Onedrive and also I need to get presentation owner details and Sharing details(Other Users permissions, Can edit or Read Only).I have checked system environment variables and I couldn't find anything on my machine. How can I do this programmatically? I have searched online, but I couldn't find anything. Please help me how to solve this type of requirement..?

Nikhin.K
  • 41
  • 7

1 Answers1

0

You could try using the OpenFileDialog and SaveFileDialog to read/write your Powerpoint Files

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   
    }
}
Falk
  • 23
  • 7