web 2.0

How to use ASP & PowerPoint - Font & Style

How to use ASP & PowerPoint - Font & Style This is learn/tutorial asp developers how to using ASP script Create PowerPoint and Font/Style

ShotDev Focus:
- ASP & Create PowerPoint and Font/Style

Example

asp_ppt_style.asp


<% Option  Explicit %>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<%
'*** Constant ***'
Const ppLayoutBlank = 12
Const ppLayoutChart = 8
Const ppLayoutChartAndText = 6
Const ppLayoutClipartAndText = 10
Const ppLayoutClipArtAndVerticalText = 26
Const ppLayoutFourObjects = 24
Const ppLayoutLargeObject = 15
Const ppLayoutMediaClipAndText = 18
Const ppLayoutMixed = -2
Const ppLayoutObject = 16
Const ppLayoutObjectAndText = 14
Const ppLayoutObjectAndTwoObjects = 30
Const ppLayoutObjectOverText = 19
Const ppLayoutOrgchart = 7
Const ppLayoutTable = 4
Const ppLayoutText = 2
Const ppLayoutTextAndChart = 5
Const ppLayoutTextAndClipart = 9
Const ppLayoutTextAndMediaClip = 17
Const ppLayoutTextAndObject = 13
Const ppLayoutTextAndTwoObjects = 21
Const ppLayoutTextOverObject = 20
Const ppLayoutTitle = 1
Const ppLayoutTitleOnly = 11
Const ppLayoutTwoColumnText = 3
Const ppLayoutTwoObjects = 29
Const ppLayoutTwoObjectsAndObject = 31
Const ppLayoutTwoObjectsAndText = 22
Const ppLayoutTwoObjectsOverText = 23
Const ppLayoutVerticalText = 25
Const ppLayoutVerticalTitleAndText = 27
Const ppLayoutVerticalTitleAndTextOverChart = 28

'*** Font Color ***'
Const wdColorLightGreen  = &HCCFFCC
Const wdColorBlue = &HFF0000

Dim ppApp,ppPres,ppSlide1,ppName
Set ppApp = Server.CreateObject("PowerPoint.Application")

ppName = "MyPP/MyPPt.ppt"

Set ppPres = ppApp.Presentations.Add(1)

Set ppSlide1 = ppPres.Slides.Add(1,ppLayoutTitleOnly)
'*** 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 ShotDev.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 ShotDev.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 ShotDev.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 ShotDev.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 ShotDev.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

ppApp.Presentations(1).SaveAs(Server.MapPath(ppName))
ppApp.Quit
Set ppApp = Nothing

'*** Font Color ***'
'Const wdColorAqua = &HCCCC33
'Const wdColorAutomatic = &HFF000000
'Const wdColorBlack = &H0
'Const wdColorBlue = &HFF0000
'Const wdColorBlueGray = &H996666
'Const wdColorBrightGreen = &HFF00
'Const wdColorBrown = &H3399
'Const wdColorDarkBlue = &H800000
'Const wdColorDarkGreen = &H3300
'Const wdColorDarkRed = &H80
'Const wdColorDarkTeal = &H663300
'Const wdColorDarkYellow = &H8080
'Const wdColorGold = &HCCFF
'Const wdColorGray05 = &HF3F3F3
'Const wdColorGray10 = &HE6E6E6
'Const wdColorGray125 = &HE0E0E0
'Const wdColorGray15 = &HD9D9D9
'Const wdColorGray20 = &HCCCCCC
'Const wdColorGray25 = &HC0C0C0
'Const wdColorGray30 = &HB3B3B3
'Const wdColorGray35 = &HA6A6A6
'Const wdColorGray375 = &HA0A0A0
'Const wdColorGray40 = &H999999
'Const wdColorGray45 = &H8C8C8C
'Const wdColorGray50 = &H808080
'Const wdColorGray55 = &H737373
'Const wdColorGray60 = &H666666
'Const wdColorGray625 = &H606060
'Const wdColorGray65 = &H595959
'Const wdColorGray70 = &H4C4C4C
'Const wdColorGray75 = &H404040
'Const wdColorGray80 = &H333333
'Const wdColorGray85 = &H262626
'Const wdColorGray875 = &H202020
'Const wdColorGray90 = &H191919
'Const wdColorGray95 = &HC0C0C
'Const wdColorGreen = &H8000
'Const wdColorIndigo = &H993333
'Const wdColorLavender = &HFF99CC
'Const wdColorLightBlue = &HFF6633
'Const wdColorLightGreen = &HCCFFCC
'Const wdColorLightOrange = &H99FF
'Const wdColorLightTurquoise = &HFFFFCC
'Const wdColorLightYellow = &H99FFFF
'Const wdColorLime = &HCC99
'Const wdColorOliveGreen = &H3333
'Const wdColorOrange = &H66FF
'Const wdColorPaleBlue = &HFFCC99
'Const wdColorPink = &HFF00FF
'Const wdColorPlum = &H663399
'Const wdColorRed = &HFF
'Const wdColorRose = &HCC99FF
'Const wdColorSeaGreen = &H669933
'Const wdColorSkyBlue = &HFFCC00
'Const wdColorTan = &H99CCFF
'Const wdColorTeal = &H808000
'Const wdColorTurquoise = &HFFFF00
'Const wdColorViolet = &H800080
'Const wdColorWhite = &HFFFFFF
'Const wdColorYellow = &HFFFF

%>
PowerPoint Created <a href="<%=ppName%>">Click here</a> to Download.
</body>
</html>

Create a asp file and save to path root-path/myasp/

Run
http://localhost/myasp/asp_ppt_style.asp

Screenshot

ASP & Create PowerPoint and Font/Style
.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (1 votes, average: 1.00 out of 10)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.