Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.68 KB

Excel.Application.ClipboardFormats.md

File metadata and controls

53 lines (33 loc) · 1.68 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
Application.ClipboardFormats property (Excel)
vbaxl10.chm133092
vbaxl10.chm133092
Excel.Application.ClipboardFormats
9b0de0b9-6acf-a73c-6d29-a405d0784170
04/04/2019
medium

Application.ClipboardFormats property (Excel)

Returns the formats that are currently on the Clipboard, as an array of numeric values. To determine whether a particular format is on the Clipboard, compare each element in the array with the appropriate constant listed in the Remarks section. Read-only Variant.

Syntax

expression.ClipboardFormats (Index)

expression A variable that represents an Application object.

Parameters

Name Required/Optional Data type Description
Index Optional Variant The array element to be returned. If this argument is omitted, the property returns the entire array of formats that are currently on the Clipboard. For more information, see the Remarks section.

Remarks

This property returns an array of numeric values. To determine whether a particular format is on the Clipboard, compare each element of the array with one of the XlClipboardFormat constants.

Example

This example displays a message box if the Clipboard contains a rich-text format (RTF) object. You can create an RTF object by copying text from a Word document.

aFmts = Application.ClipboardFormats 
For Each fmt In aFmts 
 If fmt = xlClipboardFormatRTF Then 
 MsgBox "Clipboard contains rich text" 
 End If 
Next

[!includeSupport and feedback]