PasteSpecial Method [Visio 2003 SDK Documentation]
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).
object**.PasteSpecial** (Format, [Link], [DisplayAsIcon])
object Required. An expression that returns a Master, Page, or Shape object.
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 doesn't support, linking.
DisplayAsIcon Optional Variant. True to display the pasted data as an icon; otherwise, False (the default).
Version added
2002
Remarks
To simply paste the contents of the Clipboard into an object, use the Paste method.
The PasteSpecial method of a Shape object works only with Shape objects that are group shapes. Use the Type property of a shape to determine whether it is a group.
The value of the Format argument can be any of the following:
- A value from VisPasteSpecialFormat (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 API functions, you should understand how arguments and data types are handled by the Windows API DLLs. Incorrectly calling Windows API functions may result in invalid page faults or other unexpected behaviors. For more information on calling Windows API functions, search for "Windows API" on MSDN.
Possible values for Format declared by the Visio type library in VisPasteSpecialFormat are described in the following table.
Flag | Value |
---|---|
visPasteText |
1 |
visPasteBitmap |
2 |
visPasteMetafilePicture |
3 |
visPasteOEMText |
7 |
visPasteDeviceIndependentBitmap |
8 |
visPasteEnhancedMetafile |
14 |
visPasteOleObject |
65536 |
visPasteRTF |
65537 |
visPasteHyperlink |
65538 |
visPasteURL |
65539 |
Applies to | Master object | Page object | Shape object