-
如何使用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
-
ETP芯片代码 用制无盘系统
ETP芯片代码 用制无盘系统-Xilinx chip code system using diskless system
- 2022-10-31 17:25:03下载
- 积分:1
-
数据结构图的建立和使用 包挂路径查询
数据结构图的建立和使用 包挂路径查询-map data structure, the establishment and use of packet path linking inquiries, etc.
- 2022-07-05 12:33:21下载
- 积分:1
-
= = = = = =
=== ===
Convert decimal value to binary
=======================================
This code can be used to convert
values to binary format (bits:
zeros and ones).
Use toBIN_WORD() function to convert
integers (16 bits), and
toBIN_BYTE() to convert bytes (8 bits).
Visit my Homepage:
http://www.geocities.com/emu8086/vb/
Last Update: Thursday, July 11, 2002
Copyright 2002 Alexander Popov Emulation Soft.
All rights reserved.
http://www.geocities.com/emu8086/- === === === ===
Convert decimal value to binary
=======================================
This code can be used to convert
values to binary format (bits:
zeros and ones).
Use toBIN_WORD() function to convert
integers (16 bits), and
toBIN_BYTE() to convert bytes (8 bits).
Visit my Homepage:
http://www.geocities.com/emu8086/vb/
Last Update: Thursday, July 11, 2002
Copyright 2002 Alexander Popov Emulation Sof
- 2022-06-17 10:10:48下载
- 积分:1
-
WPF图片浏览
根据图片大小,可以查看原图,对图片进行缩放,旋转等操作!
- 2022-03-16 05:52:49下载
- 积分:1
-
ch2_mousecapture_programming_mfc_prosise
以下是Jeff Prosise编写的第2版“使用MFC编程Windows”第2章的源代码。这里的源代码附带了一个完整的visualstudio构建。
- 2022-03-16 14:57:11下载
- 积分:1
-
This course is designed for individuals interested in developing their skills in...
This course is designed for individuals interested in developing their skills in Microsoft Visual C++ 6.0 while developing desktop applications. Topics include using the Microsoft Solutions Framework (MSF) building applications with the Microsoft Foundation Classes (MFC) creating user interfaces implementing application behaviors and working with persistent data. Also included are adding database support to applications creating Component Object Model (COM) components and ActiveX controls using MFC and the Active Template Library (ATL) Internet programming error handling, debugging, and testing and application deployment.
- 2022-04-01 21:44:40下载
- 积分:1
-
个人财务管理系统,适合个人日常财务管理使用,基本功能已经具备。...
个人财务管理系统,适合个人日常财务管理使用,基本功能已经具备。-Personal financial management system, suitable for day-to-day financial management of personal use, the basic functions available.
- 2022-08-23 07:28:23下载
- 积分:1
-
提供气球式对话窗口
提供气球式对话窗口-provide balloon dialogue window
- 2022-04-11 02:39:53下载
- 积分:1
-
实现程序控制的关机和重启操作
实现程序控制的关机和重启操作-To achieve control of the shutdown and restart operations
- 2022-04-09 21:53:26下载
- 积分:1