<% Option Explicit %>
<html>
<head>
<title>ThaiCreate.Com ASP & PowerPoint.Application</title>
</head>
<body>
<%
Const wdColorLightGreen = &HCCFFCC
Const wdColorBlue = &HCCFFCC
Dim ppApp,ppPres,ppSlide1,ppSlide2,ppSlide3,ppSlide4,ppName,ppDoc,objTextRng
Set ppApp = Server.CreateObject("PowerPoint.Application")
ppApp.Visible = True
ppDoc = "thaicreate.ppt"
ppName = "MyPP/MyPPt.ppt"
Set ppPres = ppApp.Presentations.Open(Server.MapPath(ppDoc))
Set ppSlide1 = ppPres.Slides(1)
'*** AddTextbox, objControl.Left,objControl.Top,objControl.Width,objControl.Height ***'
ppSlide1.Shapes.AddTextbox 1,50,100,700,100 '***4
ppSlide1.Shapes(1).TextFrame.TextRange.Text = "I Love ThaiCreate.Com 1"
ppSlide1.Shapes(1).TextFrame.TextRange.Font.Name = "Arial"
ppSlide1.Shapes(1).TextFrame.TextRange.Font.Size = 10
ppSlide1.Shapes(1).TextFrame.TextRange.Font.Color = wdColorLightGreen
ppSlide1.Shapes.AddTextbox 1,50,150,700,100
ppSlide1.Shapes(2).TextFrame.TextRange.Text = "I Love ThaiCreate.Com 2"
ppSlide1.Shapes(2).TextFrame.TextRange.Font.Name = "Arial"
ppSlide1.Shapes(2).TextFrame.TextRange.Font.Size = 20
ppSlide1.Shapes.AddTextbox 1,50,200,700,100
ppSlide1.Shapes(3).TextFrame.TextRange.Text = "I Love ThaiCreate.Com 3"
ppSlide1.Shapes(3).TextFrame.TextRange.Font.Name = "Arial"
ppSlide1.Shapes(3).TextFrame.TextRange.Font.Size = 30
ppSlide1.Shapes.AddTextbox 1,50,250,700,100
ppSlide1.Shapes(4).TextFrame.TextRange.Text = "I Love ThaiCreate.Com 4"
ppSlide1.Shapes(4).TextFrame.TextRange.Font.Name = "Arial"
ppSlide1.Shapes(4).TextFrame.TextRange.Font.Size = 40
ppSlide1.Shapes.AddTextbox 1,50,300,700,100
ppSlide1.Shapes(5).TextFrame.TextRange.Text = "I Love ThaiCreate.Com 5"
ppSlide1.Shapes(5).TextFrame.TextRange.Font.Name = "Arial"
ppSlide1.Shapes(5).TextFrame.TextRange.Font.Size = 50
ppSlide1.Shapes(5).TextFrame.TextRange.Font.Color = wdColorBlue
ppSlide1.Shapes.AddPicture Server.MapPath("thaicreate-2009.gif"),0,1,310,380,100,100 '*** Picture,Left,Top,Width,Height ***'
Set ppSlide2 = ppPres.Slides.Add(2,3)
ppSlide2.Shapes(1).TextFrame.TextRange.Text = "www.ThaiCreate.Com Version"
ppSlide2.Shapes(1).TextFrame.TextRange.Font.Color = wdColorBlue
ppSlide2.Shapes(2).TextFrame.TextRange.Text = "Version 2008" & vbCr & _
"Version 2008" & vbCr & "Version 2008" & vbCr & "Version 2008"
ppSlide2.Shapes(3).TextFrame.TextRange.Text = "Version 2009" & vbCr & _
"Version 2009" & vbCr & "Version 2009" & vbCr & "Version 2009"
Set ppSlide3 = ppPres.Slides.Add(3,4)
ppSlide3.Shapes(1).TextFrame.TextRange.Text = "We Love ThaiCreate.Com"
ppSlide3.Shapes(1).TextFrame.TextRange.Font.Color = wdColorBlue
Set ppSlide4 = ppPres.Slides.Add(4,5)
ppSlide4.Shapes(1).TextFrame.TextRange.Text = "We Love ThaiCreate.Com"
ppSlide4.Shapes(1).TextFrame.TextRange.Font.Color = wdColorBlue
ppSlide4.Shapes(2).TextFrame.TextRange.Text = "2005" & vbCr & "2006" & vbCr & "2007" & vbCr & "2008" & vbCr & "2009"
ppApp.Presentations(1).SaveAs(Server.MapPath(ppName))
ppApp.Quit
Set ppApp = Nothing
%>
PowerPoint Created <a href="<%=ppName%>">Click here</a> to Download.
</body>
</html>