web 2.0

How to use PHP & PowerPoint - Create Slides & Presentations

How to use PHP & PowerPoint - Create Slides & Presentations The Learn / Tutorial / Sctipts php programming how to using  PHP Create Slides & Presentations

ShotDev Focus:
- PHP  & Create Slides & Presentations

Example

php_ppt_slide.php


<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<?
//** Create Object ***//
$ppApp = new COM("PowerPoint.Application");
$ppName = "MyPP/MyPPt.ppt";

$strPath = realpath(basename(getenv($_SERVER["SCRIPT_NAME"]))); // C:/AppServ/www/myphp
$ppPres = $ppApp->Presentations->Add();

$ppSlide1 = $ppPres->Slides->Add(1,1);
$ppSlide1->Shapes[1]->TextFrame->TextRange->Text = "Welcome to";
$ppSlide1->Shapes[2]->TextFrame->TextRange->Text = "www.ShotDev.Com".chr(13)."Version 2010";

$ppApp->Presentations[1]->SaveAs($strPath."/".$ppName);
//$ppApp->Presentations[1]->SaveAs(realpath($ppName));

$ppApp->Quit;
$ppApp = null;

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

Create a php file and save to path root-path/myphp/

Run
http://localhost/myphp/php_ppt_slide.php

Screenshot

PHP & PowerPoint - Create Slides & Presentations
.
.
.

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.