Question

I am developing a Powerpoint Add-In application (C# visual studio), which has a feature to share the current ppt file via email. Could you please give me any suggestion for that? thanks

Was it helpful?

Solution

You should use the built-in MailMessage class in .NET. It has a property Attachments which you can fill with the attachments of your needs. Get the current file name of the file and use it to fill the Attachment class.

See MSDN for a working sample how to set and send the MailMessage.

You can get the path of the file currently editing using this:

Globals.ThisAddIn.Application.ActivePresentation.FullName

Don't forget to save it first.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top