偷偷摘套内射激情视频,久久精品99国产国产精,中文字幕无线乱码人妻,中文在线中文a,性爽19p

C#操作Word之創(chuàng)建、打開Word

開發(fā) 后端
C#操作Word之創(chuàng)建、打開Word是如何實現(xiàn)的呢?C#操作Word之創(chuàng)建、打開Word具體的操作是什么呢?那么本文就向你介紹這方面的內(nèi)容。

C#操作Word之創(chuàng)建、打開Word前提:

導入COM庫:Microsoft word 11.0 Object Library.

引用里面就增加了:

C#操作Word之創(chuàng)建、打開Word之創(chuàng)建新Word

  1. object oMissing = System.Reflection.Missing.Value;  
  2.  
  3. Word._Application oWord;  
  4.  
  5. Word._Document oDoc;  
  6.  
  7. oWord = new Word.Application();  
  8.  
  9. oWord.Visible = true;  
  10.  
  11. oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,  
  12.  
  13. ref oMissing, ref oMissing); 

C#操作Word之創(chuàng)建、打開Word之打開文檔:

  1. object oMissing = System.Reflection.Missing.Value;  
  2.  
  3. Word._Application oWord;  
  4.  
  5. Word._Document oDoc;  
  6.  
  7. oWord = new Word.Application();  
  8.  
  9. oWord.Visible = true;  
  10.  
  11. object fileName = @"E:CCCXCXXTestDoc.doc";  
  12.  
  13. oDoc = oWord.Documents.Open(ref fileName,  
  14.  
  15. ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,  
  16.  
  17. ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,  
  18.  
  19. ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing); 

C#操作Word之創(chuàng)建、打開Word的操作就向你介紹到這里,希望對你了解和學習C#操作Word之創(chuàng)建、打開Word有所幫助。

【編輯推薦】

  1. C# 操作Excel之讀取Excel操作淺析
  2. C#操作xml文件實例詳解
  3. C#操作XML文件學習綜合體會
  4. C#操作符重載的那點事兒
  5. C#操作Word書簽實例淺析
責任編輯:仲衡 來源: 博客園
相關推薦

2009-09-01 13:13:28

C#打開Word文檔

2009-09-01 13:51:51

C#創(chuàng)建Word文檔

2009-08-19 10:42:08

C#操作Word表格

2009-08-19 12:58:19

C#操作Word

2009-08-19 09:42:52

C#操作Word書簽

2009-09-01 11:21:02

C#讀取word內(nèi)容

2009-08-19 11:13:49

C#操作Word

2009-08-19 11:34:06

C#操作Word

2009-08-19 10:46:48

C#操作Word表格

2009-08-19 11:28:41

C#操作Word

2009-08-19 10:25:14

C#操作Word

2009-08-19 11:23:12

C#操作Word

2009-08-28 17:34:14

讀取word文檔

2009-09-01 11:25:08

C#讀取Word文件

2009-08-19 15:47:09

C#操作Access

2009-08-18 14:25:05

C# 操作Excel

2009-09-01 13:10:39

C#讀取Word

2009-08-25 18:16:34

.NET操作Word

2009-09-01 13:25:25

C#Word文檔替換

2009-08-19 15:13:48

C#操作Access
點贊
收藏

51CTO技術棧公眾號