Learning & Integrating web technology and code help directory

How to use PHP & PowerPoint - Export/Convert PPT To JPG and Send Email Attachment

No comments
How to use PHP & PowerPoint - Export/Convert PPT To JPG and Send Email Attachment The Learn / Tutorial / Sctipts php programming how to using  PHP Create PowerPoint and Export/Convert PPT To JPG and Send Email Attachment
ShotDev Focus:
- PHP  & Create PowerPoint and Export/Convert PPT To JPG and Send Email Attachment
Example
php_ppt_to_mail.php
  1. <html>  
  2. <head>  
  3. <title>ShotDev.Com Tutorial</title>  
  4. </head>  
  5. <body>  
  6. <?  
  7. $ppApp = new COM("PowerPoint.Application");  
  8. $ppApp->Visible = True;  
  9.   
  10. $strPath = realpath(basename(getenv($_SERVER["SCRIPT_NAME"]))); //  C:/AppServ/www/myphp  
  11.   
  12. $ppName = "MySlides.ppt";  
  13. $FileName = "MyPP";  
  14.   
  15. //*** Open Document ***//  
  16. $ppApp->Presentations->Open(realpath($ppName));  
  17.   
  18. //*** Save Document ***//  
  19. $ppApp->ActivePresentation->SaveAs($strPath."/".$FileName,17);   //'*** 18=PNG, 19=BMP **'  
  20. //$ppApp->ActivePresentation->SaveAs(realpath($FileName),17);  
  21.   
  22. $ppApp->Quit;  
  23. $ppApp = null;  
  24. ?>  
  25. PowerPoint Created to Folder <b><?=$FileName?></b>  
  26. </body>  
  27. </html>  
Create a php file and save to path root-path/myphp/

No comments :

Post a Comment