Register Register Member Login Member Login Member Login Forgot Password ??
PHP , ASP , ASP.NET, VB.NET, C#, Java , jQuery , Android , iOS , Windows Phone
 

Registered : 109,027

HOME > PHP > PHP PowerPoint (PowerPoint.Application) > PHP & PowerPoint - Font Style



Clound SSD Virtual Server

PHP & PowerPoint - Font Style

PHP & PowerPoint - Font Style ตัวอย่างนี้จะเป็นการเขียน PHP กับ PowerPoint โดยกำหนดขนาดและชนิดของ Font (Font Size & Font Color)


phpWritePowerPointFontStyle.php

<html>
<head>
<title>ThaiCreate.Com PHP & PowerPoint.Application</title>
</head>
<body>
<?php

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

	//*** Font Color ***//
	$wdColorLightGreen  = "&HCCFFCC";
	$wdColorBlue = "&HFF0000";

	$ppApp = new COM("PowerPoint.Application");

	$strPath = realpath(basename(getenv($_SERVER["SCRIPT_NAME"]))); // C:/AppServ/www/myphp
	$ppName = "MyPP/MyPPt.ppt";

	$ppPres = $ppApp->Presentations->Add();

	$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 ThaiCreate.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 ThaiCreate.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 ThaiCreate.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 ThaiCreate.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 ThaiCreate.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($strPath."/".$ppName);
	//$ppApp->Presentations[1]->SaveAs(realpath($ppName));

	$ppApp->Quit;
	$ppApp = null;
	
	//*** 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="<?php echo $ppName?>">Click here</a> to Download.
</body>
</html>









Screenshot

PHP & PowerPoint

PHP & PowerPoint

   
Share


ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท


ลองใช้ค้นหาข้อมูล


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2008-10-09 08:32:59 / 2017-03-15 11:16:15
  Download : Download  PHP & PowerPoint - Font Style
 Sponsored Links / Related

 
PHP Config PowerPoint (PowerPoint.Application)
Rating :

 
PHP Connect to PowerPoint.Application
Rating :

 
PHP & PowerPoint - Create Slides & Presentations
Rating :

 
PHP & PowerPoint - AddTextbox
Rating :

 
PHP & PowerPoint - Add/Insert Picture (AddPicture)
Rating :

 
PHP & PowerPoint - Create Multiple Slides
Rating :

 
PHP & PowerPoint - Open Template Modify/Edit Slides
Rating :

 
PHP & PowerPoint - Save Slides To HTML Format
Rating :

 
PHP & PowerPoint - Convert PPT To HTML Slides
Rating :

 
PHP & PowerPoint - Convert PPT To WMF Format
Rating :

 
PHP & PowerPoint - Convert PPT To GIF Format
Rating :

 
PHP & PowerPoint - Convert PPT To JPG Format
Rating :

 
PHP & PowerPoint - Convert PPT To JPG Send Email Attachment
Rating :


ThaiCreate.Com Forum


Comunity Forum Free Web Script
Jobs Freelance Free Uploads
Free Web Hosting Free Tools

สอน PHP ผ่าน Youtube ฟรี
สอน Android การเขียนโปรแกรม Android
สอน Windows Phone การเขียนโปรแกรม Windows Phone 7 และ 8
สอน iOS การเขียนโปรแกรม iPhone, iPad
สอน Java การเขียนโปรแกรม ภาษา Java
สอน Java GUI การเขียนโปรแกรม ภาษา Java GUI
สอน JSP การเขียนโปรแกรม ภาษา Java
สอน jQuery การเขียนโปรแกรม ภาษา jQuery
สอน .Net การเขียนโปรแกรม ภาษา .Net
Free Tutorial
สอน Google Maps Api
สอน Windows Service
สอน Entity Framework
สอน Android
สอน Java เขียน Java
Java GUI Swing
สอน JSP (Web App)
iOS (iPhone,iPad)
Windows Phone
Windows Azure
Windows Store
Laravel Framework
Yii PHP Framework
สอน jQuery
สอน jQuery กับ Ajax
สอน PHP OOP (Vdo)
Ajax Tutorials
SQL Tutorials
สอน SQL (Part 2)
JavaScript Tutorial
Javascript Tips
VBScript Tutorial
VBScript Validation
Microsoft Access
MySQL Tutorials
-- Stored Procedure
MariaDB Database
SQL Server Tutorial
SQL Server 2005
SQL Server 2008
SQL Server 2012
-- Stored Procedure
Oracle Database
-- Stored Procedure
SVN (Subversion)
แนวทางการทำ SEO
ปรับแต่งเว็บให้โหลดเร็ว


Hit Link
   







Load balance : Server 02
ThaiCreate.Com Logo
© www.ThaiCreate.Com. 2003-2024 All Rights Reserved.
ไทยครีเอทบริการ จัดทำดูแลแก้ไข Web Application ทุกรูปแบบ (PHP, .Net Application, VB.Net, C#)
[Conditions Privacy Statement] ติดต่อโฆษณา 081-987-6107 อัตราราคา คลิกที่นี่