1.引用word组件2.定义wordWord.Applicationapp=newWord.Application();Word.Documentdoc=newWord.Document();app.DisplayAlerts=Word.WdAlertLevel.wdAlertsNone;objectObj_FileName=“filename”;objectVisible=false;objectReadOnly=false;//打开文件doc=app.
系统 2019-08-12 09:27:34 2857
视频上看到的例子,对着视频打了一遍代码,测试失败,上网搜索后改了一下测试成功,不知道为什么跟视频上打的一样的代码视频上测试的正确而我的测试出错的,先不管了,先记下来,以备后用!///字符串加解密//////publicclassEncrypt{privateSymmetricAlgorithmmCSP;privateconststringCIV="oo*/^fsA";//密钥,只能是8位privateconststri
系统 2019-08-29 23:28:06 2855
DateTimedt=DateTime.Now;stringstr=dt.ToString("yyyy-MM-dd");//2013-09-07str=dt.ToString();//2013/09/0714:25:24str=dt.ToLocalTime().ToString();//2013/09/0714:25:24str=dt.ToLongDateString();//2013年9月7日str=dt.ToShortDateString();//20
系统 2019-08-12 01:54:52 2853
在项目中添加Microsoft.Office.Interop.Word.dll引用CodepublicclassWordAPI{privateobject_template;privateobject_newWord;privateMicrosoft.Office.Interop.Word.ApplicationwordApp;privateMicrosoft.Office.Interop.Word.Document_wordDocument;privat
系统 2019-08-12 09:27:02 2847
系统 2019-08-12 09:27:01 2819