Domanda

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

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top