0
VBAコードを使用して、選択したオブジェクトをパワーポイントに複製したいとします。私は以下のコードに言及していますvbaを使ってパワーポイント内のオブジェクトを複製しますか?
Sub CopySizeAndPosition()
' Usage: Select two shapes. The size and position of
' the first shape selected will be copied to the second.
Dim w As Double
Dim h As Double
Dim l As Double
Dim t As Double
With ActiveWindow.Selection.ShapeRange(1)
w = .Width
h = .Height
l = .Left
t = .Top
End With
With ActiveWindow.Selection.ShapeRange(2)
.Width = w
.Height = h
.Left = l
.Top = t
End With
End Sub
しかし、私はオブジェクトの値を取得する代わりに私の値を指定します。ですから、事前にお手伝いしてください!
がないことを確認私はあなたが達成しようとしているのか理解は、 '、.Width''の値を入力します。高さなど? 200,100ほど? –
はい、@ ShaiRado、あなたはどんな解決策もありますか、それは非常に役に立ちます。 –
既存の図形をコピーして同じスライドに貼り付け、そのプロパティを変更しますか?またはあなたの値で既存の形状プロパティを変更するだけですか? –