TypeBackspace 方法 (Word)Selection.TypeBackspace method (Word)

删除折叠的选定内容(即一个插入点)前面的字符。Deletes the character preceding a collapsed selection (an insertion point).

语法Syntax

expression.expression. TypeBackspace

_表达式_是必需的。expression Required. 表示 Selection 对象的变量。A variable that represents a Selection object.

备注Remarks

本方法与 Backspace 的功能相同。This method corresponds to functionality of the BACKSPACE key. 如果选定内容没有折叠为一个插入点,则删除选定内容。If the selection isn't collapsed to an insertion point, the selection is deleted.

示例Example

本示例删除插入点(折叠的选定内容)前面的字符。This example deletes the character preceding the insertion point (the collapsed selection).

With Selection 
 .Collapse Direction:=wdCollapseEnd 
 .TypeBackspace 
End With

本示例将选定内容扩展到当前段落的末尾(包括段落标记),然后删除选定内容。This example extends the selection to the end of the current paragraph (including the paragraph mark) and then deletes the selection.

With Selection 
 .EndOf Unit:=wdParagraph, Extend:=wdExtend 
 .TypeBackspace 
End With

另请参阅See also

Selection 对象Selection Object

支持和反馈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.