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..?
Asked
Active
Viewed 154 times
1 Answers
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
-
Thank You.I also need presentation owner details and Sharing details(Other Users permissions, Can edit or Read Only).How can i get this data? – Nikhin.K Dec 06 '19 at 11:43
-
FileInfo might help. – Falk Dec 06 '19 at 12:04
-
I couldn't find presentation owner details and user permission – Nikhin.K Dec 06 '19 at 12:28
-
You could simply google it yourself, ;) https://stackoverflow.com/questions/153087/getting-setting-file-owner-in-c-sharp – Falk Dec 06 '19 at 12:57