-
如何使用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
-
本程序是实现 wav格式转化为pcm的c++程序 附带测试程序 能成功运行...
本程序是实现 wav格式转化为pcm的c++程序 附带测试程序 能成功运行-This program is to achieve wav format into a pcm in c++ program that comes with test programs can be run successfully
- 2022-01-28 08:56:40下载
- 积分:1
-
openssl生成证书,数字签名,加密解码
资源描述
利用openssl 生成根证书,证书发布,数字签名。
握手建立会话长连接,发送,接收数据,最后销毁会话。
- 2022-01-22 10:52:17下载
- 积分:1
-
tstool 分析工具
tstool 分æžå·¥å…·-tstool analysis tools
- 2023-07-23 10:00:03下载
- 积分:1
-
ifidf算法的实现, ifidf算法的实现
ifidf算法的实现, ifidf算法的实现-ifidf algorithm, ifidf Algorithm
- 2023-05-01 07:50:03下载
- 积分:1
-
这是关于成功的业务标准
it is about standard of successfull busine-it is about standard of successfull business
- 2022-08-13 10:08:57下载
- 积分:1
-
网络聊天工具IM的C++源代码,喜欢的朋友下载。
网络聊天工具IM的C++源代码,喜欢的朋友下载。-Internet chat tool to IM" s C++ source code, like a friend to download.
- 2022-10-31 10:20:04下载
- 积分:1
-
给孩子们看的时钟源软件实践,Borland C++ Builder 5
给小朋友练习看的时钟源软件,Borland C Builder 5
- 2022-04-11 08:03:27下载
- 积分:1
-
windows of the Application Program Interface reference books that included most...
windows的应用程序界面参考书,其中包含了大部分的函数注释
- 2022-07-15 22:43:25下载
- 积分:1
-
data structure 2nd edition (C) of the source code, such as the purchase of this...
数据结构第二版(C++)上的源程序代码,如买了这本书的,可下载-data structure 2nd edition (C) of the source code, such as the purchase of this book, downloadable
- 2023-09-04 01:50:03下载
- 积分:1