Dieser Artikel wurde noch nicht bewertet - Dieses Thema bewerten.

Selection.PasteSpecial Method

Inserts the contents of the Clipboard.

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

'Usage
Dim IconIndex As Object
Dim Link As Object
Dim Placement As Object
Dim DisplayAsIcon As Object
Dim DataType As Object
Dim IconFileName As Object
Dim IconLabel As Object
Dim selection1 As Selection
selection1.PasteSpecial(IconIndex, Link, Placement, DisplayAsIcon, DataType, IconFileName, IconLabel)
void PasteSpecial(
	[In, Optional] ref object IconIndex, 
	[In, Optional] ref object Link, 
	[In, Optional] ref object Placement, 
	[In, Optional] ref object DisplayAsIcon, 
	[In, Optional] ref object DataType, 
	[In, Optional] ref object IconFileName, 
	[In, Optional] ref object IconLabel
);
public void PasteSpecial(
	/*in*/System.Object IconIndex, 
	/*in*/System.Object Link, 
	/*in*/System.Object Placement, 
	/*in*/System.Object DisplayAsIcon, 
	/*in*/System.Object DataType, 
	/*in*/System.Object IconFileName, 
	/*in*/System.Object IconLabel
);
function PasteSpecial(
	 IconIndex : Object, 
	 Link : Object, 
	 Placement : Object, 
	 DisplayAsIcon : Object, 
	 DataType : Object, 
	 IconFileName : Object, 
	 IconLabel : Object
);

Parameters

IconIndex

Optional Object. If DisplayAsIcon is True, this argument is a number that corresponds to the icon you want to use in the program file specified by IconFilename. Icons appear in the Change Icon dialog box (Insert menu, Object command, Create New tab): 0 (zero) corresponds to the first icon, 1 corresponds to the second icon, and so on. If this argument is omitted, the first (default) icon is used.

Link

Optional Object. True to create a link to the source file of the Clipboard contents. The default value is False.

Placement

Optional Object. Can be either of the following WdOLEPlacement constants: wdFloatOverText or wdInLine. The default value is wdInLine.

DisplayAsIcon

Optional Object. Optional Object. True to display the link as an icon. The default value is False.

DataType

Optional Object. A format for the Clipboard contents when they're inserted into the document. WdPasteDataType.

IconFileName

Optional Object. If DisplayAsIcon is True, this argument is the path and file name for the file in which the icon to be displayed is stored.

IconLabel

Optional Object. If DisplayAsIcon is True, this argument is the text that appears below the icon.

If you don't want to replace the contents of the specified selection, use the Collapse method before you use this method. When you use this method, the selection doesn't expand to include the contents of the Clipboard.

Unlike with the Paste method, with PasteSpecial you can control the format of the pasted information and (optionally) establish a link to the source file (for example, a Microsoft Excel worksheet).


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Fanden Sie dies hilfreich?
(1500 verbleibende Zeichen)