Stanciu
asked on
ASP and PowerPoint
How can I use PowerPoint objects in ASP?
I need to save a ppt file as JPEG components from inside ASP code.
Thanx,
Horatiu Stanciu
I need to save a ppt file as JPEG components from inside ASP code.
Thanx,
Horatiu Stanciu
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I don't know ASP, I know a little VB, I roughly put your code in an ASP page (IIS installed), but nothing happened. Can you give me some details?
Thanx,
H
Thanx,
H
Stanciu,
<%
On Error Resume Next
ppSaveAsHTML = 17
Set Wrd = CreateObject("PowerPoint.A pplication ")
wrd.Visible = True
Wrd.Presentations.Open (Server.MapPath("power.ppt "))
wrd.ActivePresentation.Sav eAs Server.MapPath("aa.jpg"), ppSaveAsHTML
wrd.quit
Set wrd = Nothing
IF Err.Number > 0 Then
Err.Raise 6 ' Raise an overflow error.
Response.Write "Error # " & CStr(Err.Number) & " " & Err.Description & VBCRLF & "<br>"
Err.Clear ' Clear the error.
Else
Response.Write "Convert To JPEG Successfully"
End IF
%>
Regards,
Wee Siong
<%
On Error Resume Next
ppSaveAsHTML = 17
Set Wrd = CreateObject("PowerPoint.A
wrd.Visible = True
Wrd.Presentations.Open (Server.MapPath("power.ppt
wrd.ActivePresentation.Sav
wrd.quit
Set wrd = Nothing
IF Err.Number > 0 Then
Err.Raise 6 ' Raise an overflow error.
Response.Write "Error # " & CStr(Err.Number) & " " & Err.Description & VBCRLF & "<br>"
Err.Clear ' Clear the error.
Else
Response.Write "Convert To JPEG Successfully"
End IF
%>
Regards,
Wee Siong
Stanciu,
After succefully, you can goto the Folder for the asp, you can see have a new folder call aa, and you can see have a jpg file insert in the folder :)
Good Luck!
Regards,
Wee Siong
After succefully, you can goto the Folder for the asp, you can see have a new folder call aa, and you can see have a jpg file insert in the folder :)
Good Luck!
Regards,
Wee Siong
Stanciu,
Some of these questions have been open for quite a long time. Please return and respond to the Experts who have given of their time and knowledge to assist you.
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20009336
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20064638
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20071394
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20077011
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20077033
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20077693
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20137082
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20137098
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20181757
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20191142
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20191630
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20195568
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20006738
Thanks,
Netminder
Community Support Moderator
Experts Exchange
Some of these questions have been open for quite a long time. Please return and respond to the Experts who have given of their time and knowledge to assist you.
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20009336
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20064638
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20071394
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20077011
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20077033
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20077693
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20137082
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20137098
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20181757
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20191142
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20191630
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20195568
https://www.experts-exchange.com/jsp/qShow.jsp?qid=20006738
Thanks,
Netminder
Community Support Moderator
Experts Exchange
Admin notified of user neglect. Force/accepted by
Netminder
Community Support Moderator
Experts Exchange
Netminder
Community Support Moderator
Experts Exchange
Try this:
<%
theformat = 4 'i am no sure is what variable, you can try from 1 - 16
Set wrd = CreateObject("Word.Applica
wrd.Documents.Open Server.MapPath("aa.ppt")
wrd.Visible = False
wrd.Application.ActivePres
wrd.Application.quit
Set wrd = Nothing
%>
Regards,
Wee Siong