PasteAndFormat Method
TOC
Collapse the table of content
Expand the table of content

Selection.PasteAndFormat Method (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Pastes the selected table cells and formats them as specified.

expression .PasteAndFormat(Type)

expression Required. A variable that represents a Selection object.

Parameters

Name

Required/Optional

Data Type

Description

Type

Required

WdRecoveryType

The type of formatting to use when pasting the selected table cells.

This example pastes a selected Microsoft Excel chart as a picture. This example assumes that the Clipboard contains an Excel chart.

Sub PasteChart() 
 Selection.PasteAndFormat Type:=wdChartPicture 
End Sub
Show:
© 2016 Microsoft