-
如何使用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
-
用VC.net编写的模拟操作系统动态分区管理.有注释.
用VC.net编写的模拟操作系统动态分区管理.有注释.-VC.net prepared with the dynamic simulation of the operating system area management. It Notes.
- 2022-05-29 08:19:35下载
- 积分:1
-
时间/日期显示,关机提醒,万年历,关机,重启,注销,开启音乐,并可开机启动。...
时间/日期显示,关机提醒,万年历,关机,重启,注销,开启音乐,并可开机启动。-Time/date display, shut down reminders, calendar, shutdown, restart, write-off, open the music, and start-up.
- 2022-02-06 07:02:32下载
- 积分:1
-
这个东西不一定很好!但是界面方面还不错.功能一般般.............应该是垃圾中的极品...
这个东西不一定很好!但是界面方面还不错.功能一般般.............应该是垃圾中的极品-this is not necessarily a good thing! However interface is not bad. General function as ............. should refuse statuary
- 2022-02-02 05:15:01下载
- 积分:1
-
栈,队列的实现,链表的简单操作,包括…
实现栈,队列,链表的简单操作,其中链表包括单链表,双链表,循环链表。-The realization of stacks, queues, linked list of simple operations, which include single-list list, double-linked list, circular list.
- 2022-06-20 14:44:13下载
- 积分:1
-
cayman提供的PXA270 wince下的bsp源码包
cayman提供的PXA270 wince下的bsp源码包-cayman provided PXA270 wince bsp source package under
- 2022-07-09 21:23:50下载
- 积分:1
-
MFC 库存管理系统, 插入、添加及删除 ,保存等功能
MFC 库存管理系统, 插入、添加及删除 ,保存等功能-This file contains a summary of what you will find in each of the files that
make up your GoodsManager application.
- 2023-03-07 17:15:05下载
- 积分:1
-
- 2022-09-22 15:15:03下载
- 积分:1
-
类似Windows的计算器的源码,小程序,初学VC++的朋友可以看下...
类似Windows的计算器的源码,小程序,初学VC++的朋友可以看下-similar to the Windows source code calculators, small procedures, beginner VC++ can facie friends
- 2023-02-15 01:50:04下载
- 积分:1
-
利用windowsce的远程管理,对远程计算机进行操作
利用windowsce的远程管理,对远程计算机进行操作-operate the long-distance computers using the remote management of windows ce.
- 2023-03-12 03:40:04下载
- 积分:1