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,038

HOME > ASP.NET > ASP.NET PowerPoint (PowerPoint.Application) > ASP.NET & PowerPoint - Open Template Modify/Edit Slides


ASP.NET & PowerPoint - Open Template Modify/Edit Slides

ASP.NET & PowerPoint - Open Template Modify/Edit Slides เป็นการเปิดเอกสาร .ppt ที่มีอยู่แล้วเพื่อมาแก้ไข หรือ เพิ่มเติมในส่วนของ Slides

ASP.NET Config PowerPoint.Application


Syntax

ppApp.Presentations.Open()



Sample

01.Imports Microsoft.Office.Interop.PowerPoint
02.Public Class AspNetPowerPointOpenPPT
03.    Inherits System.Web.UI.Page
04. 
05.    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
06. 
07.        Const wdColorLightGreen = &HCCFFCC
08.        Const wdColorBlue = &HCCFFCC
09. 
10.        Dim ppApp As New Microsoft.Office.Interop.PowerPoint.Application
11.        Dim ppPres As Presentation
12.        Dim ppSlide1, ppSlide2, ppSlide3, ppSlide4 As Slide
13.        Dim ppName As String = "MyPP/MyPPt.ppt"
14.        Dim ppDoc As String = "thaicreate.ppt"
15. 
16.        ppApp.Visible = True
17. 
18.        ppPres = ppApp.Presentations.Open(Server.MapPath(ppDoc))
19. 
20.        ppSlide1 = ppPres.Slides(1)
21.        '*** AddTextbox, objControl.Left,objControl.Top,objControl.Width,objControl.Height ***'
22.        ppSlide1.Shapes.AddTextbox(1, 50, 100, 700, 100) '***4
23.        ppSlide1.Shapes(1).TextFrame.TextRange.Text = "I Love ThaiCreate.Com 1"
24.        ppSlide1.Shapes(1).TextFrame.TextRange.Font.Name = "Arial"
25.        ppSlide1.Shapes(1).TextFrame.TextRange.Font.Size = 10
26.        ppSlide1.Shapes(1).TextFrame.TextRange.Font.Color.RGB = wdColorLightGreen
27. 
28.        ppSlide1.Shapes.AddTextbox(1, 50, 150, 700, 100)
29.        ppSlide1.Shapes(2).TextFrame.TextRange.Text = "I Love ThaiCreate.Com 2"
30.        ppSlide1.Shapes(2).TextFrame.TextRange.Font.Name = "Arial"
31.        ppSlide1.Shapes(2).TextFrame.TextRange.Font.Size = 20
32. 
33.        ppSlide1.Shapes.AddTextbox(1, 50, 200, 700, 100)
34.        ppSlide1.Shapes(3).TextFrame.TextRange.Text = "I Love ThaiCreate.Com 3"
35.        ppSlide1.Shapes(3).TextFrame.TextRange.Font.Name = "Arial"
36.        ppSlide1.Shapes(3).TextFrame.TextRange.Font.Size = 30
37. 
38.        ppSlide1.Shapes.AddTextbox(1, 50, 250, 700, 100)
39.        ppSlide1.Shapes(4).TextFrame.TextRange.Text = "I Love ThaiCreate.Com 4"
40.        ppSlide1.Shapes(4).TextFrame.TextRange.Font.Name = "Arial"
41.        ppSlide1.Shapes(4).TextFrame.TextRange.Font.Size = 40
42. 
43.        ppSlide1.Shapes.AddTextbox(1, 50, 300, 700, 100)
44.        ppSlide1.Shapes(5).TextFrame.TextRange.Text = "I Love ThaiCreate.Com 5"
45.        ppSlide1.Shapes(5).TextFrame.TextRange.Font.Name = "Arial"
46.        ppSlide1.Shapes(5).TextFrame.TextRange.Font.Size = 50
47.        ppSlide1.Shapes(5).TextFrame.TextRange.Font.Color.RGB = wdColorBlue
48.        ppSlide1.Shapes.AddPicture(Server.MapPath("thaicreate-2009.gif"), 0, 1, 310, 380, 100, 100) '*** Picture,Left,Top,Width,Height ***'
49. 
50. 
51.        ppSlide2 = ppPres.Slides.Add(2, 3)
52.        ppSlide2.Shapes(1).TextFrame.TextRange.Text = "www.ThaiCreate.Com Version"
53.        ppSlide2.Shapes(1).TextFrame.TextRange.Font.Color.RGB = wdColorBlue
54.        ppSlide2.Shapes(2).TextFrame.TextRange.Text = "Version 2008" & vbCr & _
55.        "Version 2008" & vbCr & "Version 2008" & vbCr & "Version 2008"
56.        ppSlide2.Shapes(3).TextFrame.TextRange.Text = "Version 2009" & vbCr & _
57.        "Version 2009" & vbCr & "Version 2009" & vbCr & "Version 2009"
58. 
59.        ppSlide3 = ppPres.Slides.Add(3, 4)
60.        ppSlide3.Shapes(1).TextFrame.TextRange.Text = "We Love ThaiCreate.Com"
61.        ppSlide3.Shapes(1).TextFrame.TextRange.Font.Color.RGB = wdColorBlue
62. 
63.        ppSlide4 = ppPres.Slides.Add(4, 5)
64.        ppSlide4.Shapes(1).TextFrame.TextRange.Text = "We Love ThaiCreate.Com"
65.        ppSlide4.Shapes(1).TextFrame.TextRange.Font.Color.RGB = wdColorBlue
66.        ppSlide4.Shapes(2).TextFrame.TextRange.Text = "2005" & vbCr & "2006" & vbCr & "2007" & vbCr & "2008" & vbCr & "2009"
67. 
68.        ppApp.Presentations(1).SaveAs(Server.MapPath(ppName))
69.        ppApp.Quit()
70.        ppApp = Nothing
71. 
72.        Me.lblText.Text = "PowerPoint Created <a href=" & ppName & ">Click here</a> to Download."
73. 
74.    End Sub
75.End Class

Screenshot

ASP.NET & PowerPoint



ดาวน์โหลด Code ทั้งหมดได้จากในส่วนของดาวน์โหลด

   
Hate it
Don't like it
It's ok
Like it
Love it
Share


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


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


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2008-10-26 21:08:56 / 2017-03-29 11:53:19
  Download : Download  ASP.NET & PowerPoint - Open Template Modify/Edit Slides
 Sponsored Links / Related

 
ASP.NET Config PowerPoint (PowerPoint.Application)
Rating :

 
ASP.NET Connect to PowerPoint.Application
Rating :

 
ASP.NET & PowerPoint - Create Slides & Presentations
Rating :

 
ASP.NET & PowerPoint - AddTextbox
Rating :

 
ASP.NET & PowerPoint - Font Style
Rating :

 
ASP.NET & PowerPoint - Add/Insert Picture (AddPicture)
Rating :

 
ASP.NET & PowerPoint - Create Multiple Slides
Rating :

 
ASP.NET & PowerPoint - Save Slides To HTML Format
Rating :

 
ASP.NET & PowerPoint - Convert PPT To HTML Slides
Rating :

 
ASP.NET & PowerPoint - Convert PPT To WMF Format
Rating :

 
ASP.NET & PowerPoint - Convert PPT To GIF Format
Rating :

 
ASP.NET & PowerPoint - Convert PPT To JPG Format
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
   





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