CREATE a POWERPOINT FILE using PHP COM on FLY

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
saravanan.r
Forum Newbie
Posts: 4
Joined: Sat Jul 10, 2004 4:17 am
Contact:

CREATE a POWERPOINT FILE using PHP COM on FLY

Post by saravanan.r »

feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


Hi ALL,

I need more info about methods and properties which is to insert a TEXT in TEXT BOX for Powerpoint Slides, and i have to change the background image, FONT, SIZE, Etc... for my Powerpoint Slides on FLY.

I have displays the code below.

Code: Select all

<?php
$powerpnt = new COM("powerpoint.application");
//Creating a new presentation
$pres=$powerpnt->Presentations->Add();
//Adds the first slide. "12" means blank slide
$pres->Slides->Add(1,12);
//Adds another slide. "10" means a slide with a clipart and text
$pres->Slides->Add(2,10);
//Adds a textbox (1=horizontal, 20=left margin, 50=top margin, 300=width, 40=height)
$pres->Slides[1]->Shapes->AddTextbox(1,20,50,300,40);
//Adds a 16-point star (94=16 point star, 100=left margin, 200=top margin, 300=width, 300=height)
$pres->Slides[1]->Shapes->AddShape(94,100,200,300,300);
//Save the document as PPT file
$powerpnt->Presentations[1]->SaveAs("D:\byeworld.ppt");
//And of course, quit Power Point
$powerpnt->quit();
//Give the user a download link
echo '<a href="byeworld.ppt">Download file as .ppt</a>';
?>
Thanks in advance.


awaiting for earliest reply.

Saravanan.R


feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

That's much more related to PowerPoint and COM than it is to php.
It seems to me you get faster results e.g. at http://msdn2.microsoft.com/en-us/community/default.aspx
saravanan.r
Forum Newbie
Posts: 4
Joined: Sat Jul 10, 2004 4:17 am
Contact:

Post by saravanan.r »

yes but i think they don't have any help or tutorial for this in Microsoft Site.
Post Reply