note 18460 added to class.com
| From: | mstaiger at informatik dot uni-siegen dot de | Date: | Wed, 23 Jan 2002 23:17:38 +0000 |
| Subject: | note 18460 added to class.com | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-25759@lists.php.net to get a copy of this message | ||
The example above (MS Word) is quiet unsatisfying, as I find. Especially since I couldn't find
anybody who actually got it running, including myself.
You might therefore give this Powerpoint-example a chance:
----------------------------------
#Instantiate a PowerPoint object.
$ppoint = new COM("PowerPoint.application") or die("Unable to instantiate
PowerPoint");
#Create a new presentation
$ppoint->Presentations->Add() or die ("Could not create presentation");
//Add a slide
$slide=$ppoint->Presentations[1]->Slides->Add(1,1);
//Get the name of this slide
$slidename = $slide->Name();
echo"<br>slidename : $slidename";
//Change the name of this new slide
$slide->Name = "New Slidename";
$slidename = $slide->Name();
echo"<br>NEW slidename : $slidename";
//Save the presentation
$ppoint->Presentations[1]->SaveAs("c:/InetPub/www/test.ppt");
$ppoint->Presentations[1]->Close();
//closing powerpoint
$ppoint->Quit();
//free the object
$ppoint->Release();
$ppoint = null;
-----------------------
the config is :
w2k-server/office2k/iis5/php 4.1.1 isapi
If you happen to run into a working word2k-example, please let me know.
Marc
--
http://www.php.net/manual/en/class.com.php
http://master.php.net/manage/user-notes.php?action=edit+18460
http://master.php.net/manage/user-notes.php?action=delete+18460
http://master.php.net/manage/user-notes.php?action=reject+18460