word中的字数统计功能怎么写? word中的字数统计功能怎么写?要一个个字判断吗?给个代码参照下。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Word.Document ThisDocument = ThisApplication.Documents.Open(ref fileName, ref missingValue, ref myTrue, ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue, ref missingValue); Word.Range rng = ThisDocument.Content; rng.Select(); count = ThisDocument.Characters.Count; 获取WORD内容Word.ApplicationClass wordApp=new ApplicationClass();object file=path;object nullobj=System.Reflection.Missing.Value; Word.Document doc = wordApp.Documents.Open(ref file, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj, ref nullobj);doc.ActiveWindow.Selection.WholeStory();doc.ActiveWindow.Selection.Copy();IDataObject data=Clipboard.GetDataObject();string str=data.GetData(DataFormats.Text).ToString();doc.Close(); 我的意思是只需要那个功能就行说简单点吧比如一个richtextbox控件我怎么统计汉字个数与英文单词数 tabControl 选项卡能不能放在左面 js刷新问题 求解!!!! 有关才c#编写串口程序的问题 求助一个Xpath 写法。 新手~~取字符串 求助关于vs.net winform2005视图设计器无法打开问题 为什么我写的Console程序运行时只是一闪而过,但是书上却是可以停止不动? c# 让textbox按什么就显示什么,如何显示Ctrl+A这样的复合键 有人知道怎样将水晶报表数据转化为html文件么? 继续散分 c# 能加压缩 用java写的webservice返回结果吗? 求一条SQL语句的写法
ref missingValue, ref missingValue, ref missingValue,
ref missingValue, ref missingValue, ref missingValue,
ref missingValue, ref missingValue, ref missingValue,
ref missingValue);
Word.Range rng = ThisDocument.Content;
rng.Select();
count = ThisDocument.Characters.Count;
获取WORD内容
Word.ApplicationClass wordApp=new ApplicationClass();
object file=path;
object nullobj=System.Reflection.Missing.Value;
Word.Document doc = wordApp.Documents.Open(
ref file, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj,
ref nullobj, ref nullobj, ref nullobj);doc.ActiveWindow.Selection.WholeStory();
doc.ActiveWindow.Selection.Copy();
IDataObject data=Clipboard.GetDataObject();
string str=data.GetData(DataFormats.Text).ToString();
doc.Close();
说简单点吧
比如一个richtextbox控件
我怎么统计汉字个数与英文单词数