How to use ASP & PowerPoint - Convert PPT To JPG Format This is learn/tutorial asp developers how to using ASP script Create PowerPoint and Export/Convert PPT To JPG and Send Email Attachment
ShotDev Focus:
- ASP & Create PowerPoint and Export/Convert PPT To JPG and Send Email Attachment
Example
asp_ppt_to_mail.asp
<% OptionĀ Explicit %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <% Dim ppApp,ppName,FileName Set ppApp = Server.CreateObject("PowerPoint.Application") ppApp.Visible = True ppName = "MySlides.ppt" FileName = "MyPP/" '*** Open Document ***' ppApp.Presentations.Open(Server.MapPath(ppName)) '*** Save Document ***' ppApp.ActivePresentation.SaveAs Server.MapPath(FileName),17 ppApp.Quit Set ppApp = Nothing '**************** Send Email ******************' Dim myMail,HTML,strMsg Dim objFSO,objFile,Vol Set myMail = Server.CreateObject("CDONTS.NewMail") Set objFSO = Server.CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.GetFolder(Server.MapPath("MyPP")) For Each Vol in objFile.Files If Trim(Vol.Name) <> "" Then myMail.AttachFile Server.MapPath("MyPP/"&Vol.Name) End If Next myMail.From = "Webmaster <webmaster@shotdev.com>" myMail.Value("Reply-To") = "shotdev@hotmail.com" myMail.To = "member@shotdev.com" myMail.Subject = "My PowerPoint (Convert to JPG)" myMail.MailFormat = 0 myMail.BodyFormat = 0 myMail.Body = "Convert to JPG" myMail.Send Set myMail = Nothing Set objFile = Nothing Set objFSO = Nothing '*************** End Send Email ***************' Response.write"PowerPoint Created and Email Sending." %> </body> </html>
Create a asp file and save to path root-path/myasp/
Run
http://localhost/myasp/asp_ppt_to_mail.asp
.
.
.
Download this script.