-
如何使用DocX 库在 .DOCX 文件中替换一列单词
翻译 maninwest@Codeforge 作者:B. Clay Shannon@Codeproject使用 DocX 库替换 .docx 文件中的字任务我想替换英式英语的拼写为美式口语。例如, 替换 "colour" 为 "color", "centre" 为 "center", "plough" 为"plow", 等。我可以使用查找>替换来一个一个地替换,但是很麻烦。所以,我找到一个库 。为了使用这个 docx库,只需从 这里 下载(docx.dll)。在你的项目中添加到它的引用,然后添加此 using子句:using Novacode;
首先需要加载具有”错误"拼写的文档:string filename = string.Empty;
DialogResult result = openFileDialog1.ShowDialog();
if (result == DialogResult.OK)
{
filename = openFileDialog1.FileName;
}
else
{
MessageBox.Show("No file selected - hasta la vista and Ciao, baby!");
return;
}
using (DocX document = DocX.Load(filename))
{
document.ReplaceText("travelled", "traveled");
document.Save();
}
我们当然想以此完成所有词汇替换。首先,我们需要有一列单词,这样编码: 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报
- 2022-01-25 21:24:19下载
- 积分:1
-
一个小巧的汉语字典,字典数据来自其它程序,取词功能是用了ibm智能词典的Dll文件(vc.net)...
一个小巧的汉语字典,字典数据来自其它程序,取词功能是用了ibm智能词典的Dll文件(vc.net)-a small Chinese dictionaries, dictionaries of data from other programs, admission term function is used ibm smart Dictionary Dll files (vc.net)
- 2022-03-13 14:47:33下载
- 积分:1
-
ehlib5.6源码
安装方法:
1. 把 EhLib 中的 common 和 DataService 文件拷贝到 Delphi7 目录中.
2. 在 TOOLS->Environment Options->Library->Library Path 中添入Delphi7 路径。
3. 在Delphi 7中打开EHLIB70.DPK ,编译一下(点击Compile),但不要安装。
3. 在Delphi 7中打开DclEhLib70.dpk,编译(点击Compile)再安装(点击 Install)。
4. 打开附带的DEMOS,编译并运行,测试安装成功。
有安装EhLib5.0控件后,使用打印功能时,总是出现“Error reading Splitter.ExplicitTop:Property ExplicitTop does not exitst.” 这个错误,关于这个错误的解决方法如下。
先找到这个文件 PrvFrmEh.dfm
打开这个文件,在这个文件中找这个属性定义,查找ExplicitTop这个关键字(好像有两个地方),把这一行直接去掉,再查询ExplicitHeight这个关键字(只有一个地方),也去掉,保存,编译,一切OK。
- 2022-05-12 20:08:31下载
- 积分:1
-
一个类似资源管理器的远程序,很好用
一个类似资源管理器的远程序,很好用-A similar far-Explorer program, a very good use
- 2023-01-17 15:00:03下载
- 积分:1
-
经典的用于windows的bison的C++工具源码,是我找了很长时间找到这个好用的...
经典的用于windows的bison的C++工具源码,是我找了很长时间找到这个好用的-WindowsbisonC++ 源 耄?撕 艹 时 业玫
- 2022-10-25 14:50:02下载
- 积分:1
-
弹珠台游戏源码,国内游戏编程网站上下载的很不错的程序,附带源码...
弹珠台游戏源码,国内游戏编程网站上下载的很不错的程序,附带源码-Playing marble set game source code, very good procedure that local game plait distance website up and down carry, supplementary source code
- 2022-02-13 07:47:50下载
- 积分:1
-
Remote boot source to support the windows xp system
远程开机源程序,支持windows xp系统-Remote boot source to support the windows xp system
- 2022-03-19 01:10:54下载
- 积分:1
-
通过重画鼠标所在区域,显示一个与鼠标位置跟随的图片或者图形,非常好玩。
通过重画鼠标所在区域,显示一个与鼠标位置跟随的图片或者图形,非常好玩。-Mouse through the re-drawing the region, showing the location of a mouse to follow the pictures or graphics, very fun.
- 2022-02-04 04:56:42下载
- 积分:1
-
MFC技术内幕(配书源码CHAP07.rar
MFC技术内幕(配书源码CHAP07.rar-MFC Insider (book distribution source CHAP07.rar
- 2022-11-13 06:40:04下载
- 积分:1
-
Wince4.2 operating system under the code database operation routines classic! !...
Wince4.2操作系统下的数据库操作例程代码
经典哦!!
绝对可用!-Wince4.2 operating system under the code database operation routines classic! ! Absolutely available!
- 2023-08-21 14:20:05下载
- 积分:1