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 > ASP.NET > ASP.NET Word.Application > ASP.NET & Word (Word Application) - Page Breaking



Clound SSD Virtual Server

ASP.NET & Word (Word Application) - Page Breaking

ASP.NET & Word (Word.Application) - Page Breaking ตัวอย่างนี้จะเป็นการเขียน ASP.NET กับ Word มีการแบ่งการแสดงผลเป็นหน้า

ASP.NET Config Word (Word Application)


Framework 1.1,2.0,3.0,4.0

Word Document for C# อ่านและดัดแปลงได้จากบทความนี้


Sample

Imports Microsoft.Office.Interop.Word
Public Class AspNetWordParagraphsRange
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Const wdColorDarkRed = &H80
        Const wdAlignParagraphCenter = 1
        Const wdAlignParagraphLeft = 0
        Const wdParagraph = 4
        Const wdHorizontalPositionMargin = 0
        Const wdTableLeft = -999998
        Const wdCollapseEnd = 0

        Dim Wrd As New Microsoft.Office.Interop.Word.Application
        Dim WrdDoc As Microsoft.Office.Interop.Word.Document
        Dim MyRange1, MyRange2, MyRange3 As Microsoft.Office.Interop.Word.Range
        Dim DocName As String = "MyDoc/MyWord.doc"

        Wrd.Application.Visible = False

        WrdDoc = Wrd.Documents.Add()

        MyRange1 = WrdDoc.Paragraphs.Add.Range
        With MyRange1
            .ParagraphFormat.Alignment = wdAlignParagraphCenter
            .Font.Name = "Verdana"
            .Font.Size = "30"
            .Font.Bold = True
            .InsertBefore("www.ThaiCreate.Com" & vbCrLf & "Version 2009")
        End With

        MyRange2 = WrdDoc.Paragraphs.Add.Range
        With MyRange2
            .ParagraphFormat.Alignment = wdAlignParagraphCenter
            .Font.Name = "Verdana"
            .Font.Size = "15"
            .Font.Bold = True
            .InsertBefore(vbCrLf & vbCrLf & "PHP,ASP and ASP.NET Tutorial")
        End With

        MyRange3 = WrdDoc.Paragraphs.Add.Range
        With MyRange3
            .ParagraphFormat.Alignment = wdAlignParagraphCenter
            .Font.Name = "Verdana"
            .Font.Size = "10"
            .Font.Bold = True
            .Font.Color = wdColorDarkRed
            .Underline = True
            .InsertBefore(vbCrLf & vbCrLf & vbCrLf & vbCrLf & "All Rights Reserved")
        End With

        WrdDoc.SaveAs(Server.MapPath(DocName))
        Wrd.Application.Quit()
        Wrd = Nothing


    End Sub
End Class


Screenshot

ASP.NET & Word

ASP.NET & Word


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






   
Share


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


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


   


Bookmark.   
       
  By : ThaiCreate.Com Team (บทความเป็นลิขสิทธิ์ของเว็บไทยครีเอทห้ามนำเผยแพร่ ณ เว็บไซต์อื่น ๆ)
  Score Rating :  
  Create/Update Date : 2008-10-26 21:03:59 / 2011-09-08 22:41:17
  Download : Download  ASP.NET & Word (Word Application) - Page Breaking
 Sponsored Links / Related

 
ASP.NET Word Response.ContentType = "application/vnd.ms-word"
Rating :

 
ASP.NET Config Word (Word Application)
Rating :

 
ASP.NET Connect to Word Application
Rating :

 
ASP.NET & Word (Word Application) - Create Word Document
Rating :

 
ASP.NET & Word (Word Application) - Page Setup
Rating :

 
ASP.NET & Word (Word Application) - BuiltInDocumentProperties
Rating :

 
ASP.NET & Word (Word Application) - Font & Style
Rating :

 
ASP.NET & Word (Word Application) - Paragraphs & Range
Rating :

 
ASP.NET & Word (Word Application) - Create/Insert Table (Tables.Add)
Rating :

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

 
ASP.NET & Word (Word Application) - Open Document (Documents.Open)
Rating :

 
ASP.NET & Word (Word Application) - Word Document Sample Report
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 อัตราราคา คลิกที่นี่