C#操作Word文檔(Office 2007)

發表于:2008-04-23來源:作者:點擊數: 標簽:OfficeWord文檔
關鍵字:C#操作Word文檔首先引入類庫,Microsoft.Office.Interop.Word,然后進行編程。代碼如下: usingSystem; usingSystem.Collections.Generic; usingSystem.ComponentModel; usingSystem.Data; usingSystem.Drawing; usingSystem.Text; usingSystem. Windo
關鍵字:C#操作Word文檔   首先引入類庫,Microsoft.Office.Interop.Word,然后進行編程。代碼如下: 
   
  using System; 
  using System.Collections.Generic; 
  using System.ComponentModel; 
  using System.Data; 
  using System.Drawing; 
  using System.Text; 
  using System.Windows.Forms; 
  using Microsoft.Office.Interop.Word; 
   
  namespace WordTest 
  { 
   public partial class Form1 : Form 
   { 
   object strFileName; 
   Object Nothing; 
   Microsoft.Office.Interop.Word.Application myWordApp = new Microsoft.Office.Interop.Word.ApplicationClass(); 
   Document myWordDoc; 
   string strContent = ""; 
   
   public Form1() 
   { 
   InitializeComponent(); 
   } 
   
   private void button1_Click(object sender, EventArgs e) 
   { 
   createWord(); 
   //openWord(); 
   } 

原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97