什么是故事? [英] What is a story?

查看:51
本文介绍了什么是故事?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在MS Word VBA中,度量的故事"的单位是什么?它在Word文档的单位层次结构中适合什么位置?

In MS Word VBA, what is the unit of measure "Story" and where does it fit into the hierarchy of units in a Word document?

本参考文件仅说wdUnits.wdStory指的是故事",无济于事.我找不到其他参考资料来解释我要寻找的内容.

This reference only says that wdUnits.wdStory refers to "a story" which is not helpful. I couldn't find any other references that explain what I'm looking for.

推荐答案

实际上,这是一个比大多数人想象的更为复杂的问题.在Microsoft Word博客中,帖子的故事定义为:

This is actually a more complicated question than most would think. In a Microsoft Word blog post stories are defined as:

"......组成Word文档并共享属性和功能的内容的不同区域.换句话说,Word在幕后将所有文档分解为具有共享属性和功能的块的集合.正式地,这些是称为故事."

"...distinct regions of content that make up a Word document and share properties and functionality. Put differently, behind the scenes, Word breaks all documents up into a collection of chunks with shared properties and functionality. Officially, these are called stories."

这些块可以是注释,尾注,脚注,页脚,页眉等.

These chunks can be comments, endnotes, footnotes, footers, headers, etc.

该博客文章的最新内容为:

Later on the blog post states:

"......文档中的所有故事都利用一组共同的属性来确定每个故事中内容的呈现方式.这些共享的属性包括字体信息,样式定义,编号定义和文档设置."

"...all stories in a document utilize a common set of properties that determine the presentation of the contents within each story. These shared properties include font information, style definitions, numbering definitions, and document settings."

有关更多信息,请参见完整的Microsoft博客文章:

For more information, please see the full Microsoft blog post:

更新

@WaiHaLee引起了我的注意,我在原始答案中链接到的Microsoft博客文章不再可用.因此,我将进一步详细说明单词对象模型中的故事.

@WaiHaLee has brought to my attention that the Microsoft blog post I link to in my original answer is no longer available. Because of this, I will elaborate further on what a Story is in the Word Object Model.

截至本文撰写时,有17种类型的故事,如Word VBA IDE的对象浏览器中的以下屏幕截图所示:

As of this writing there are 17 types of Stories, as this screen capture from the Object Browser of the Word VBA IDE shows:

其中的每个选项都可以通过StoryRanges集合,以编程方式影响Word文档中的特定内容区域.

Each of these allows a specific region of content within a Word document to be affected programmatically, often via the StoryRanges collection.

艾伦·怀亚特(Allen Wyatt)写了一篇很好的文章,标题为

Allen Wyatt has written a very good article entitled

在选择全部内容时包括页眉和页脚

其中,他解释了使用StoryRanges的一些不同方法.例如,一个人只能在文档的主要页脚"区域中更新字段:

wherein he explains some different methods for using StoryRanges. For example, one can update fields in only the Primary Footer area of a document:

ActiveDocument.StoryRanges(wdPrimaryFooterStory).Fields.Update

StoryRanges也可以用于搜索文档的特定区域,如

StoryRanges can also be used to search particular areas of a document as detailed in

使用宏替换文档中出现的文本

因此,简而言之,StoryRanges集合允许程序员影响Word文档的全部或某些独特部分.每个部分都是一个列举为StoryType的范围.每个StoryType都是Word中的故事.

So in short, the StoryRanges collection allows a programmer to affect all or some of the unique parts of a Word Document. Each part is a Range enumerated as a StoryType. And each StoryType is what is meant as a Story within Word.

这篇关于什么是故事?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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