用于比较格式化的word文档和源文档的VBA宏 [英] VBA macro for comparing formatted word document with source document

查看:92
本文介绍了用于比较格式化的word文档和源文档的VBA宏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我是


我正在尝试识别格式化后word文档中引入的更改。在将样式应用于文档中的文本时,我观察到了一些不寻常的变化,例如:粗体,上标文本更改为普通文本。在审核期间,这些更改几乎不可能在大型文档(约200页或更多页)中以可视方式捕获。



我尝试使用单词中的比较功能和它捕获每一个格式更改。因此,查看大型文档的大量列表变得冗长乏味。



我想看的是影响我文档内容的具体更改。 />


以下是我想要捕获的实例:



1.删除任何字或字母(不包括空格字符)



2.任何单词或字母的插入(不包括空格字符)



$ b 3。更改信件的情况

$
4.粗体文字更改为Unbold



5.斜体文字更改为非斜体



6.从文本中删除下划线



7.上标或下标文本变更为普通文本



我可以使用比较功能一词来看这些更改(以及太多其他格式更改,这些更改不会影响文档的质量)。如果有人可以帮我提取上面列出的更改可能是一个新的
word文档或任何其他格式,我将不胜感激。



单词版本我使用的是MS Word 2013.
$


期待这方面的一些解决方案。

Hello,

I am trying to identify the changes that are introduced in a word document after formatting. While applying styles to text in the document I have observed some unusual changes, for eg: Bold, superscript text changing to normal text. These changes are almost impossible to catch visually in large documents (~200 pages or more) during review.

I tried using the compare feature in word and it catches every single formatting change. So it becomes tedious to review the huge list for large documents.

What I am trying to look is for specific changes that are affecting the content of my documents.

Below are the instances that I want to catch:

1. Any deletion of word or letters (excluding space character)

2. Any insertion of word or letters (excluding space character)

3. Change of case of letters

4. Bold text changing to Unbold

5. Italics text changing to non italics

6. Removal of underline from text

7. Superscript or subscript text getting changed to normal text

I could see these changes using the word compare feature (along with too many other formatting changes which do not affect the quality of document to that extent). I would appreciate if anyone can help me extract only the above listed changes in may be a new word document or in any other format.

The word version I am using is MS Word 2013.

Looking forward to some solutions on this.

提前致谢!

Mayur

推荐答案


我正在尝试识别格式化后word文档中引入的更改。在将样式应用于文档中的文本时,我观察到了一些不寻常的变化,例如:粗体,上标文本更改为普通文本。在审核期间,这些更改几乎不可能在大型文档(约200页或更多页)中以可视方式捕获。



我尝试使用单词中的比较功能和它捕获每一个格式更改。因此,查看大型文档的大量列表变得很繁琐。



我想看的是影响我文档内容的具体更改。

I am trying to identify the changes that are introduced in a word document after formatting. While applying styles to text in the document I have observed some unusual changes, for eg: Bold, superscript text changing to normal text. These changes are almost impossible to catch visually in large documents (~200 pages or more) during review.

I tried using the compare feature in word and it catches every single formatting change. So it becomes tedious to review the huge list for large documents.

What I am trying to look is for specific changes that are affecting the content of my documents.

但这正是比较功能的用途 - 而你似乎想要捕获最多无论如何修改。如果您不感兴趣的特定更改,您可以在比较的输出文档上运行一个宏来接受跟踪
的修订版本以更改该类型,只留下要查看的余额。 Word的VBA允许您使用18种修订类型:

But that is precisely what the compare feature is for - and you seem to want to capture most revisions anyway. If there are particular changes you're not interested in, you could run a macro on the compare's output document to accept the revisions tracked for changes of that type, leaving you with only the balance to review. Word's VBA lets you work with 18 revision types:

1 插入。

2 删除。

3 物业已更改。

4 段落编号已更改。

5 字段显示已更改。

6 修订标记为已对帐冲突。

7 修订标记为冲突。

8 款式改变了。

9 替换。

10 段落属性已更改。

11 表格属性已更改。

12 部分属性已更改。

13 样式定义已更改。

14 内容来自。

15 内容已移至。

16 已插入表格单元格。

17 删除了表格单元格。

18 表格细胞合并。 

1 Insertion.
2 Deletion.
3 Property changed.
4 Paragraph number changed.
5 Field display changed.
6 Revision marked as reconciled conflict.
7 Revision marked as a conflict.
8 Style changed.
9 Replaced.
10 Paragraph property changed.
11 Table property changed.
12 Section property changed.
13 Style definition changed.
14 Content moved from.
15 Content moved to.
16 Table cell inserted.
17 Table cell deleted.
18 Table cells merged. 

您可能也对我在
https://answers.microsoft.com/en-us/office/forum/office_2007-word/可能导出的单词跟踪更改信息/ e0dee9dc-aedb-41d3-92bf-8dc609cc75af
,它将跟踪的修订导出到Excel工作簿进行分析。请参阅我在2014年11月3日的回复。
Excel输出允许您对数据进行排序或过滤,因此您只能考虑特定的修订类型,如果这是您想要的。

You may also be interested in the macro I posted in https://answers.microsoft.com/en-us/office/forum/office_2007-word/possible-to-export-word-track-changes-information/e0dee9dc-aedb-41d3-92bf-8dc609cc75af, which exports tracked revisions to an Excel workbook for analysis. See my reply of November 3, 2014. The Excel output allows you to sort or filter the data, so you can consider only particular revision types if that's what you want.

这篇关于用于比较格式化的word文档和源文档的VBA宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆