The following Word VBA macro pastes plain text.
Macro Example
Sub PasteTextOnly() Selection.PasteSpecial DataType:=wdPasteText End Sub
Description
[Application.]Selection
Selection...
The Application.Selection property returns the Selection object that represents a selected range or the insertion point.
The Selection property is a member of the Word.Global class, so we can omit the Application property.
Selection.PasteSpecial
Selection.PasteSpecial...
The Selection.PasteSpecial inserts the contents of the Clipboard.
The parameter: DataType specifies a format for the Clipboard contents when they are inserted into the document.
Sub PasteTextOnly() Selection.PasteSpecial DataType:=wdPasteText End Sub
Properties
http://www.relief.jp/itnote/archives/word-vba-paste-text.php
Apply To
- Word 2013
- Word 2010
- Word 2007