新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
C#操作Word之創(chuàng)建、打開Word
C#操作Word之創(chuàng)建、打開Word前提:

網(wǎng)站建設(shè)哪家好,找成都創(chuàng)新互聯(lián)!專注于網(wǎng)頁設(shè)計、網(wǎng)站建設(shè)、微信開發(fā)、微信小程序定制開發(fā)、集團(tuán)企業(yè)網(wǎng)站建設(shè)等服務(wù)項目。為回饋新老客戶創(chuàng)新互聯(lián)還提供了包頭免費建站歡迎大家使用!
導(dǎo)入COM庫:Microsoft word 11.0 Object Library.
引用里面就增加了:
C#操作Word之創(chuàng)建、打開Word之創(chuàng)建新Word
- object oMissing = System.Reflection.Missing.Value;
- Word._Application oWord;
- Word._Document oDoc;
- oWord = new Word.Application();
- oWord.Visible = true;
- oDoc = oWord.Documents.Add(ref oMissing, ref oMissing,
- ref oMissing, ref oMissing);
C#操作Word之創(chuàng)建、打開Word之打開文檔:
- object oMissing = System.Reflection.Missing.Value;
- Word._Application oWord;
- Word._Document oDoc;
- oWord = new Word.Application();
- oWord.Visible = true;
- object fileName = @"E:CCCXCXXTestDoc.doc";
- oDoc = oWord.Documents.Open(ref fileName,
- ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
- ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
- ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing);
C#操作Word之創(chuàng)建、打開Word的操作就向你介紹到這里,希望對你了解和學(xué)習(xí)C#操作Word之創(chuàng)建、打開Word有所幫助。
新聞名稱:C#操作Word之創(chuàng)建、打開Word
分享URL:http://www.5511xx.com/article/dhcjoie.html


咨詢
建站咨詢
