ASP.NET(vb.net) & PowerPoint - Convert PPT To JPG Format - This isĀ example scripts how to use ASP.NET convert PPT (PowerPoint Presentations) To JPG Format.
ShotDev Focus:
- ASP.NET(vb.net) & PowerPoint - Convert PPT To JPG Format
Example
AspNetPowerPointConvertToJPG.aspx
<%@ Page Language="VB" AutoEventWireup="false" CodeFile="AspNetPowerPointConvertToJPG.aspx.vb" Inherits="AspNetPowerPointConvertToJPG" %> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form id="form1" runat="server"> <asp:Label id="lblText" runat="server"></asp:Label> </form> </body> </html>
AspNetPowerPointConvertToJPG.aspx.vb
Imports Microsoft.Office.Interop.PowerPoint Public Class AspNetPowerPointConvertToJPG Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim ppApp As New Microsoft.Office.Interop.PowerPoint.Application Dim ppName As String = "MySlides.ppt" Dim FileName As String = "MyPP" ppApp.Visible = True ppApp.Presentations.Open(Server.MapPath(ppName)) ppApp.ActivePresentation.SaveAs(Server.MapPath(FileName), 17) '*** 18=PNG, 19=BMP ***' ppApp.Quit() ppApp = Nothing Me.lblText.Text = "PowerPoint Created to Folder <strong> " & FileName & "</strong>" End Sub End Class
Screenshot