Word.RequestContext class
RequestContext 对象可简化对 Word 应用程序的请求。 由于 Office 加载项和 Word 应用程序在两个不同的进程中运行,因此需要请求上下文才能从外接程序访问 Word 对象模型。
注解
使用方
- Word:运行
- Word。注释:context
- Word。AnnotationCollection:context
- Word。应用程序:context
- Word。书目:context
- Word。正文:上下文
- Word。书签:context
- Word。BookmarkCollection:context
- Word。边框:上下文
- Word。BorderCollection:context
- Word。BorderUniversal:context
- Word。BorderUniversalCollection:context
- Word。中断:context
- Word。BreakCollection:context
- Word。BuildingBlock:context
- Word。BuildingBlockCategory:context
- Word。BuildingBlockCategoryCollection: context
- Word。BuildingBlockCollection:context
- Word。BuildingBlockEntryCollection:context
- Word。BuildingBlockGalleryContentControl:context
- Word。BuildingBlockTypeItem:context
- Word。BuildingBlockTypeItemCollection:context
- Word。Canvas:context
- Word。CheckboxContentControl: context
- Word。共同创作:context
- Word。CoauthorCollection: context
- Word.合著:context
- Word。共同创作Lock:context
- Word。共同创作LockCollection: context
- Word。共同创作Update: context
- Word。CoauthoringUpdateCollection: context
- Word。ColorFormat:context
- Word。ComboBoxContentControl: context
- Word。注释:context
- Word。CommentCollection:context
- Word。CommentContentRange: context
- Word。CommentReply:context
- Word。CommentReplyCollection: context
- Word。ConditionalStyle:context
- Word。冲突:上下文
- Word。ConflictCollection:context
- Word。ContentControl:context
- Word。ContentControlCollection: context
- Word。ContentControlListItem:context
- Word。ContentControlListItemCollection: context
- Word。CritiqueAnnotation: context
- Word。CustomProperty:context
- Word。CustomPropertyCollection:context
- Word。CustomXmlNode:context
- Word。CustomXmlNodeCollection:context
- Word。CustomXmlPart:context
- Word。CustomXmlPartCollection: context
- Word。CustomXmlPartScopedCollection: context
- Word。CustomXmlPrefixMapping: context
- Word。CustomXmlPrefixMappingCollection: context
- Word。CustomXmlSchema:context
- Word。CustomXmlSchemaCollection: context
- Word。CustomXmlValidationError: context
- Word。CustomXmlValidationErrorCollection: context
- Word。DatePickerContentControl: context
- Word。文档:context
- Word。DocumentCreated:context
- Word。DocumentLibraryVersion:context
- Word。DocumentLibraryVersionCollection: context
- Word。DocumentProperties:context
- Word。DropCap:context
- Word。DropDownListContentControl: context
- Word。编辑器:context
- Word。EditorCollection: context
- Word。字段:context
- Word。FieldCollection:context
- Word。FillFormat:context
- Word。字体:context
- Word。FontNameCollection: context
- Word。框架:context
- Word。FrameCollection:context
- Word。GlowFormat:context
- Word。GroupContentControl:context
- Word。HeadingStyle:context
- Word。HeadingStyleCollection:context
- Word。HtmlDivision:context
- Word。HtmlDivisionCollection:context
- Word。超链接:context
- Word。HyperlinkCollection:context
- Word。索引:context
- Word。IndexCollection:context
- Word。InlinePicture:context
- Word。InlinePictureCollection: context
- Word。LineFormat:context
- Word。LineNumbering:context
- Word。LinkFormat:context
- Word。列表:context
- Word。ListCollection:context
- Word。ListFormat:context
- Word。ListItem:context
- Word。ListLevel:context
- Word。ListLevelCollection: context
- Word。ListTemplate:context
- Word。ListTemplateCollection: context
- Word。ListTemplateGallery:context
- Word。ListTemplateGalleryCollection: context
- Word。NoteItem:context
- Word。NoteItemCollection:context
- Word。OleFormat:context
- Word。页面:context
- Word。PageCollection:context
- Word。PageSetup:context
- Word。窗格:context
- Word。PaneCollection:context
- Word。段落:context
- Word。ParagraphCollection:context
- Word。ParagraphFormat:context
- Word。PictureContentControl: context
- Word。范围:context
- Word。RangeCollection:context
- Word。RangeScopedCollection:context
- Word。ReadabilityStatistic: context
- Word。ReadabilityStatisticCollection: context
- Word。ReflectionFormat:context
- Word。RepeatingSectionContentControl: context
- Word。RepeatingSectionItem: context
- Word。RepeatingSectionItemCollection: context
- Word。审阅者:context
- Word。ReviewerCollection: context
- Word。修订:context
- Word。RevisionCollection: context
- Word。RevisionsFilter: context
- Word。SearchOptions:context
- Word。节:context
- Word。SectionCollection: context
- Word。选择:context
- Word。设置:context
- Word。SettingCollection:context
- Word。底纹:上下文
- Word。ShadingUniversal: context
- Word。ShadowFormat:context
- Word。形状:上下文
- Word。ShapeCollection:context
- Word。ShapeFill:context
- Word。ShapeGroup:context
- Word。ShapeTextWrap:context
- Word。源:context
- Word。SourceCollection:context
- Word。样式:context
- Word。StyleCollection:context
- Word。TabStop:context
- Word。TabStopCollection:context
- Word。表:context
- Word。TableBorder:context
- Word。TableCell:context
- Word。TableCellCollection:context
- Word。TableCollection:context
- Word。TableColumn:context
- Word。TableColumnCollection: context
- Word。TableOfAuthorities: context
- Word。TableOfAuthoritiesCategory: context
- Word。TableOfAuthoritiesCategoryCollection: context
- Word。TableOfAuthoritiesCollection: context
- Word。TableOfContents:context
- Word。TableOfContentsCollection: context
- Word。TableOfFigures:context
- Word。TableOfFiguresCollection: context
- Word。TableRow:context
- Word。TableRowCollection:context
- Word。TableStyle:context
- Word。模板:context
- Word。TemplateCollection:context
- Word。TextColumn:context
- Word。TextColumnCollection: context
- Word。TextFrame:context
- Word。ThreeDimensionalFormat: context
- Word。TrackedChange:context
- Word。TrackedChangeCollection: context
- Word。视图:上下文
- Word。WebSettings:context
- Word。窗口:context
- Word。WindowCollection:context
- Word。XmlMapping:context
- Word。XmlNode:context
- Word。XmlNodeCollection:context
示例
// *.run methods automatically create an OfficeExtension.ClientRequestContext
// object to work with the Office file.
await Word.run(async (context: Word.RequestContext) => {
const document = context.document;
// Interact with the Word document...
});
构造函数
| (constructor)(url) | 构造 类的新实例 |
构造函数详细信息
(constructor)(url)
构造 类的新实例RequestContext
constructor(url?: string);
参数
- url
-
string