-
如何使用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
-
two games were the source of 331, C written in the interest of the studies can h...
2人五子棋游戏源,C写的,有兴趣的可以研究研究,希望大家一起讨论,献丑了-two games were the source of 331, C written in the interest of the studies can hope that we can discuss the shortcoming
- 2022-11-27 14:45:04下载
- 积分:1
-
be passed directly through the system of information, primarily for hard disk si...
通过程序直接得到系统中各分区的信息,主要是对于硬盘大小、状态作出指示。程序是由VB编写。-be passed directly through the system of information, primarily for hard disk size, the state"s instruction. VB procedure is prepared.
- 2023-02-26 22:10:03下载
- 积分:1
-
Exporting data read by windows messaging to another windows application via wind...
Exporting data read by windows messaging to another windows application via windows messaging
- 2023-04-01 17:00:03下载
- 积分:1
-
调用Win32 API读取驱动器序列号并转换成可阅读形式
调用Win32 API读取驱动器序列号并转换成可阅读形式-call Win32 API reading drive serial number and converted into readable form
- 2022-01-25 20:27:13下载
- 积分:1
-
As an industrial control software, an integral part of this software can be used...
为一个工业控制软件的一个组成部分,此软件可用于控制电镀生产线-As an industrial control software, an integral part of this software can be used to control the electroplating production line
- 2023-02-17 10:15:04下载
- 积分:1
-
协助书记和程序
program to assist the secretary and the
instructors of a private school
- 2022-03-14 08:37:34下载
- 积分:1
-
实现算数的运算,包括加减乘除,2,3次开方,以及求平方差等功能。...
实现算数的运算,包括加减乘除,2,3次开方,以及求平方差等功能。-Computing to achieve counts, including the calculation, prescribing 2,3 times, and poor function of the square for.
- 2022-03-15 14:59:54下载
- 积分:1
-
乳腺癌患者使用全局相似性
该数据集的名称是哈伯曼的存活数据集(1991年3月4日)。该数据集包含从1958年到1970年间在芝加哥的比林斯大学医院对谁经历了手术的乳腺癌患者的生存期是进行一个研究案例。[3]
- 2022-05-28 20:18:23下载
- 积分:1
-
i.MX27的NAND Flash驱动程序
i.mx27 nand flash driver
- 2022-02-25 23:38:08下载
- 积分:1