免费视频淫片aa毛片_日韩高清在线亚洲专区vr_日韩大片免费观看视频播放_亚洲欧美国产精品完整版

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
create a document write text and save with Word
/*      create a document write text and save with Word     taken from Example01.cs*/private void Example01Main(){   // start word and turn off msg boxes   Word.Application wordApplication = new Word.Application();   wordApplication.DisplayAlerts = WdAlertLevel.wdAlertsNone;   // add a new document   Word.Document newDocument = wordApplication.Documents.Add();   // insert some text   wordApplication.Selection.TypeText("This text is written by NetOffice");   wordApplication.Selection.HomeKey(WdUnits.wdLine, WdMovementType.wdExtend);   wordApplication.Selection.Font.Color = WdColor.wdColorSeaGreen;   wordApplication.Selection.Font.Bold = 1;   wordApplication.Selection.Font.Size = 18;   // save the document   string fileExtension = GetDefaultExtension(wordApplication);   object documentFile = 
string.Format("{0}\\Example01{1}", Application.StartupPath, fileExtension); newDocument.SaveAs(documentFile); // close word and dispose reference wordApplication.Quit(); wordApplication.Dispose(); FinishDialog fDialog = new FinishDialog("Document saved.", documentFile.ToString()); fDialog.ShowDialog(this);}#region Helper/// <summary>/// returns the valid file extension for the instance. for example ".doc" or ".docx"/// </summary>/// <param name="application">the instance</param>/// <returns>the extension</returns>private static string GetDefaultExtension(Word.Application application){ double version = Convert.ToDouble(application.Version, CultureInfo.InvariantCulture); if (version >= 12.00) return ".docx"; else return ".doc";}#endregion
本站僅提供存儲服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請點(diǎn)擊舉報。
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
部分Office 2007文件格式轉(zhuǎn)換為xps和pdf代碼整理
Part2:Back to School with the Class of Web 2.0
利用word將PDF轉(zhuǎn)換DOC文件的方法 --電腦高手
Random thoughts on coding & technology: OLE Automation with Delphi part I
Office組件輕松把PDF文件轉(zhuǎn)成Word文檔
用office 2003提取圖片中的文字
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長圖 關(guān)注 下載文章
綁定賬號成功
后續(xù)可登錄賬號暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服