"添加" "编辑" 方法 (Word)Editors.Add method (Word)

返回一个Editor对象, 该对象代表指定用户修改文档中的区域或所选内容的新权限。Returns an Editor object that represents a new permission for a specified user to modify a range or selection within a document. .

语法Syntax

表达式(EditorID)expression.Add (EditorID)

expression 是必需的。expression Required. 一个代表 "编辑器" 集合的变量。A variable that represents an 'Editors' collection.

参数Parameters

名称Name 必需/可选Required/Optional 数据类型Data type 说明Description
EditorIDEditorID 可选Optional VariantVariant 可以是一个字符串, 表示用户的电子邮件别名 (如果在同一域中)、电子邮件地址或代表一组用户的WdEditorTypeCan be either a String that represents the user's email alias (if in the same domain), an email address, or a WdEditorType that represents a group of users.

示例Example

以下示例将选定文本的编辑权限分配给当前用户。The following example gives editing permissions for the selected text to the current user.

Dim objEditor As Editor 
 
Set objEditor = Selection.Editors.Add(wdEditorCurrent)

另请参阅See also

集合编辑器Editors Collection

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.