Export (0) Print
Expand All
Expand Minimize

Page.PasteSpecial Method (Visio)

Inserts the contents of the Clipboard, allowing you to control the format of the pasted information and (optionally) establish a link to the source file (for example, a Microsoft Word document).

Version Added: Visio 2002

expression .PasteSpecial(Format, Link, DisplayAsIcon)

expression A variable that represents a Page object.

Parameters

Name

Required/Optional

Data Type

Description

Format

Required

Long

The internal Clipboard format.

Link

Optional

Variant

True to establish a link to the source of the pasted data; otherwise, False (the default). Ignored if the source data is not suitable for, or does not support, linking.

DisplayAsIcon

Optional

Variant

True to display the pasted data as an icon; otherwise, False (the default).

Return Value

Nothing

To simply paste the contents of the Clipboard into an object, use the Paste method.

The value of the Format argument can be any of the following:

  • A value from VisPasteSpecialCodes (see the following table).

  • Any of the standard Clipboard formats, for example, CF_TEXT. For details, see the Microsoft Platform SDK on MSDN, the Microsoft Developer Network Web site.

  • Any value returned from a call to the RegisterClipboardFormat function. For details, see the Microsoft Platform SDK on MSDN.

NoteNote

Before calling Microsoft Windows functions, you should understand how arguments and data types are handled by the Windows API DLLs. Incorrectly calling Windows functions may result in invalid page faults or other unexpected behaviors. For more information on calling Windows functions, search for "Windows API" on MSDN.

Possible values for Format declared by the Visio type library in VisPasteSpecialCodes are described in the following table.

Constant

Value

Description

visPasteBitmap

2

Paste bitmap.

visPasteDIB

8

Paste device-independent bitmap.

visPasteEMF

14

Paste enhanced metafile.

visPasteHyperlink

65538

Paste hyperlink.

visPasteInk

65544

Paste Ink data.

visPasteMetafile

3

Paste metafile.

visPasteOEMText

7

Paste OEM text.

visPasteOLEObject

65536

Paste OLE object.

visPasteRichText

65537

Paste rich text.

visPasteText

1

Paste ANSI text.

visPasteURL

65539

Paste Uniform Resource Locator (URL).

visPasteVisioIcon

65543

Paste Visio icon.

visPasteVisioMastersXML

65546

Paste Visio masters XML.

visPasteVisioMasters

65541

Paste Visio masters.

visPasteVisioShapesXML

65545

Paste Visio shapes XML.

visPasteVisioShapesWithoutDataLinks

65548

Paste Visio drawing data without internal data links.

visPasteVisioShapes

65540

Paste Visio shapes.

visPasteVisioText

65542

Paste Visio text.

Show:
© 2014 Microsoft