1
我粘貼表從Excel到PowerPoint與此代碼:VBA CommandBars.ExecuteMso( 「PasteAsTableSourceFormatting」)的鏈接源
pptApp.CommandBars.ExecuteMso ("PasteAsTableSourceFormatting")
,一切工作正常。但是,我如何將它鏈接到源範圍?
我粘貼表從Excel到PowerPoint與此代碼:VBA CommandBars.ExecuteMso( 「PasteAsTableSourceFormatting」)的鏈接源
pptApp.CommandBars.ExecuteMso ("PasteAsTableSourceFormatting")
,一切工作正常。但是,我如何將它鏈接到源範圍?
您可以使用@JamieG提供的功能去粘貼形狀(Related Question)的引用,那麼你可以通過訪問鏈接屬性訪問一定範圍的粘貼形狀的:
Dim shp As Shape
Set shp = GetPastedShape()
'Assuming the pasted shape contains a excel spreadsheet
If shp.Type = msoEmbeddedOLEObject Then
shp.OLEFormat.Object.Workbook.Sheet(1).Range("A1")
End If