-
如何使用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
-
WinXp Internet跳棋游戏人机对战VB源码
WinXp Internet跳棋游戏人机对战VB源码-WinXp Internet checkers game players VB source plane!
- 2022-01-31 17:21:48下载
- 积分:1
-
在wince系统下用c++读取gps的程序
在wince系统下用c++读取gps的程序-Nicholson systems in C++ using a GPS reading procedures
- 2022-03-31 05:48:32下载
- 积分:1
-
presentation of development skill
presentation of development ski-presentation of development skill
- 2022-01-26 07:01:21下载
- 积分:1
-
Teoria de la informacion y teoria de codigos de José Angel Bustos Perez
Teoria de la informacion y teoria de codigos de José Angel Bustos Perez
- 2022-10-16 00:10:03下载
- 积分:1
-
一个windows shell扩展程序dll源码 可以在鼠标右键的“发送到”菜单中增加一个“console window” 用于在资源管理器中打开console...
一个windows shell扩展程序dll源码 可以在鼠标右键的“发送到”菜单中增加一个“console window” 用于在资源管理器中打开console方式的exe文件 结果在新开的console窗口中显示 而不是缺省的一闪而过-a shell windows dll extension procedures in the source code by right-clicking the "Send to" menu to add a "console window" for the resource management for open console mode of exe files in the new findings open the console window shows instead of the default rather than the flashing
- 2022-03-31 19:34:38下载
- 积分:1
-
a campaign
一个平抛运动演示程序.-a campaign-throwing demonstration program.
- 2023-08-24 14:40:03下载
- 积分:1
-
这是一本effectiveC++_2E,对于大多数用C或C++的学习者有很大帮助!...
这是一本effectiveC++_2E,对于大多数用C或C++的学习者有很大帮助!-This is a effectiveC++ _2E, For most use C or C++ Learners are very helpful!
- 2022-01-26 03:49:42下载
- 积分:1
-
MCI' s application examples, including the play WAV, MIDI files and play the...
MCI的应用示例,包括播放WAV、MIDI文件和播放CD及将CD中的曲目转录为WAV文件等 -MCI" s application examples, including the play WAV, MIDI files and play the CD in the CD and the tracks transcribed into WAV files
- 2022-04-15 08:25:41下载
- 积分:1
-
实现在Windows mobile系统手机的一键重启和关机功能
实现在Windows mobile系统手机的一键重启和关机功能-Windows mobile system in the implementation of a key cell phone to restart and shutdown function
- 2023-07-26 20:15:03下载
- 积分:1