Range.PasteSpecial Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Inserts the contents of the Clipboard.
public void PasteSpecial (ref object IconIndex, ref object Link, ref object Placement, ref object DisplayAsIcon, ref object DataType, ref object IconFileName, ref object IconLabel);
abstract member PasteSpecial : obj * obj * obj * obj * obj * obj * obj -> unit
Public Sub PasteSpecial (Optional ByRef IconIndex As Object, Optional ByRef Link As Object, Optional ByRef Placement As Object, Optional ByRef DisplayAsIcon As Object, Optional ByRef DataType As Object, Optional ByRef IconFileName As Object, Optional ByRef IconLabel As Object)
Parameters
- IconIndex
- Object
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
- Object
Optional Object. True to create a link to the source file of the Clipboard contents. The default value is False.
- Placement
- Object
Optional Object. Can be either of the following WdOLEPlacement constants: wdFloatOverText or wdInLine. The default value is wdInLine.
- DisplayAsIcon
- Object
Optional Object. Optional Object. True to display the link as an icon. The default value is False.
- DataType
- Object
Optional Object. A format for the Clipboard contents when they're inserted into the document. WdPasteDataType.
- IconFileName
- Object
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
- Object
Optional Object. If DisplayAsIcon
is True, this argument is the text that appears below the icon.
Remarks
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).
If you don't want to replace the contents of the specified range, use the Collapse(Object) method before you use this method. When you use this method, the range doesn't expand to include the contents of the Clipboard.
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기