Word.RequestContext class
RequestContext 对象有助于请求 Word 应用程序。 由于 Office 加载项和 Word 应用程序在两个不同的进程中运行,因此需要请求上下文才能从加载项访问 Word 对象模型。
注解
使用方
- Word:运行
- Word.注释:上下文
- Word.AnnotationCollection: context
- Word.应用程序:上下文
- Word.参考书目:上下文
- Word.正文:上下文
- Word.书签:上下文
- Word.BookmarkCollection: context
- Word.边框:上下文
- Word.BorderCollection: context
- Word.BorderUniversal: context
- Word.BorderUniversalCollection: context
- Word.中断:上下文
- 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.画布:上下文
- Word.CheckboxContentControl: context
- Word.共同创作: 上下文
- Word.CoauthorCollection: context
- Word.合著:上下文
- Word.CoauthoringLock: context
- Word.CoauthoringLockCollection: context
- Word.CoauthoringUpdate: context
- Word.CoauthoringUpdateCollection: context
- Word.ColorFormat: context
- Word.ComboBoxContentControl: context
- Word.注释:上下文
- Word.CommentCollection: context
- Word.CommentContentRange: context
- Word.CommentReply: 上下文
- Word.CommentReplyCollection: context
- Word.ConditionalStyle: context
- Word.冲突:上下文
- Word.ConflictCollection: context
- Word.ContentControl: context
- Word.ContentControlCollection: context
- Word.ContentControlListItem: context
- Word.ContentControlListItemCollection: context
- Word.CritiqueAnnotation: 上下文
- 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.文档:上下文
- Word.DocumentCreated: context
- Word.DocumentLibraryVersion: context
- Word.DocumentLibraryVersionCollection: context
- Word.DocumentProperties: context
- Word.DropCap: context
- Word.DropDownListContentControl: context
- Word.编辑器:上下文
- Word.EditorCollection: context
- Word.字段:上下文
- Word.FieldCollection: context
- Word.FillFormat: context
- Word.字体:上下文
- Word.FontNameCollection: context
- Word.框架:上下文
- Word.FrameCollection: context
- Word.GlowFormat: context
- Word.GroupContentControl: context
- Word.HeadingStyle: context
- Word.HeadingStyleCollection: context
- Word.HtmlDivision: context
- Word.HtmlDivisionCollection: context
- Word.超链接:上下文
- Word.HyperlinkCollection: context
- Word.索引:上下文
- Word.IndexCollection: context
- Word.InlinePicture: 上下文
- Word.InlinePictureCollection: context
- Word.LineFormat: context
- Word.行编号:上下文
- Word.LinkFormat: context
- Word.列表:上下文
- 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.页面:上下文
- Word.PageCollection: context
- Word.PageSetup: context
- Word.窗格:上下文
- Word.PaneCollection: context
- Word.段落:上下文
- Word.ParagraphCollection: 上下文
- Word.段落格式:上下文
- Word.PictureContentControl: context
- Word.范围:上下文
- Word.RangeCollection: context
- Word.RangeScopedCollection: context
- Word.ReadabilityStatistic: 上下文
- Word.ReadabilityStatisticCollection: context
- Word.ReflectionFormat: context
- Word.RepeatingSectionContentControl: context
- Word.RepeatingSectionItem: context
- Word.RepeatingSectionItemCollection: context
- Word.审阅者:上下文
- Word.ReviewerCollection: context
- Word.修订:上下文
- Word.RevisionCollection: context
- Word.RevisionsFilter: context
- Word.SearchOptions: context
- Word.部分:上下文
- Word.SectionCollection: context
- Word.选择:上下文
- Word.SensitivityLabel: context
- Word.SensitivityLabelAbacAttribute: context
- Word.SensitivityLabelAbacAttributeValue: context
- Word.SensitivityLabelDetails: context
- Word.SensitivityLabelDetailsCollection: context
- Word.SensitivityLabelsCatalog: context
- Word.设置:上下文
- Word.SettingCollection: context
- Word.底纹:上下文
- Word.ShadingUniversal: context
- Word.ShadowFormat: context
- Word.形状:上下文
- Word.ShapeCollection: context
- Word.ShapeFill:上下文
- Word.ShapeGroup: context
- Word.ShapeTextWrap: context
- Word.来源:上下文
- Word.SourceCollection: context
- Word.样式:上下文
- Word.StyleCollection: context
- Word.TabStop: 上下文
- Word.TabStopCollection: context
- Word.表:上下文
- 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: 上下文
- Word.TableOfContentsCollection: context
- Word.TableOfFigures: context
- Word.TableOfFiguresCollection: context
- Word.TableRow: context
- Word.TableRowCollection: context
- Word.TableStyle: context
- Word.模板:上下文
- 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.窗口:上下文
- 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