![]() |
| サイトマップ | |
|
トップ | オブジェクト | プロパティ | メソッド | 定数 |
Paste メソッド |
オブジェクト:MacroItem , NotebookItem , ReportItem , FitItem , GraphItem , TransformItem , NativeWorksheetItem
指定したノートブックアイテムドキュメント、または、その現在の位置に Windows のクリップボードの内容を貼り付けます。指定する format は、Edit メニューの Paste Special (形式を指定して貼り付け) コマンドに表示されるクリップボード形式のいずれかです。
Dim NotebookItems$() ReDim NotebookItems$(ActiveDocument.NotebookItems.Count) Dim Index Index = 0 Dim index2 index2=0 Dim DataList$(ActiveDocument.NotebookItems.Count) Dim Item For Each Item In ActiveDocument.NotebookItems If ActiveDocument.NotebookItems(Index).ItemType = 1 Or ActiveDocument.NotebookItems(Index).ItemType = 8 Then DataList$(Index2) = ActiveDocument.NotebookItems(Index).Name index2=index2+1 End If Index = Index + 1 Next Item Begin Dialog UserDialog 320,119,"Worksheet Items in Active Notebook" ' %GRID:10,7,1,1 OKButton 210,14,90,21 ListBox 20,14,170,91,DataList(),.ListBox1 End Dialog Dim dlg1 As UserDialog Dialog dlg1 Dim SelectedDataSheet SelectedDataSheet=dlg1.ListBox1 ActiveDocument.NotebookItems(DataList(CLng(SelectedDataSheet))).Open Dim MaxColumn As Long Dim MaxRows As Long MaxColumn = 0 MaxRows = 0 ActiveDocument.CurrentDataItem.DataTable.GetMaxUsedSize(MaxColumn,MaxRows) Dim collist$() ReDim collist$(MaxColumn+1) Dim i For i=1 To MaxColumn+1 collist$(i)=CStr(i) Next i Begin Dialog UserDialog 500,133,"Paste Column" ' %GRID:10,7,1,1 Text 20,21,360,21,"Target Worksheet: "+ActiveDocument.CurrentDataItem.Name,.Text1 OKButton 400,14,80,21 DropListBox 140,77,60,80,collist$(),.DropListBox1 Text 20,77,110,14,"Paste in Column:",.Text2 GroupBox 230,56,220,70,"Paste Behavior",.GroupBox1 OptionGroup .Group1 OptionButton 250,77,20,14,"OptionButton1",.OptionButton1 OptionButton 250,98,20,14,"OptionButton2",.OptionButton2 Text 280,77,160,14,"Shift existing cells down",.Text3 Text 280,98,160,14,"Overwrite existing cells",.Text4 End Dialog Dim dlg2 As UserDialog dlg2.DropListBox1=CStr(MaxColumn) Dialog dlg2 ActiveDocument.CurrentDataItem.Goto(0,dlg2.DropListBox1) If dlg2.Group1=0 Then ActiveDocument.CurrentDataItem.InsertionMode = True End If ActiveDocument.CurrentDataItem.Paste ActiveDocument.NotebookItems("Data 1").InsertionMode= False
![]() |
↓ |
![]() |