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).
Syntax
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
Remarks
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.
Note
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. |
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.