将形状从 excel 调整为 powerpoint
Resize shapes from excel to powerpoint
每当我粘贴一个从 excel 到 VBA 的具有预期大小的形状时,大小总是不同的。确切地说, .Left
部分。
这是我的代码的简短版本:
With PPTPres.Slides(pptcel.Offset(0, -8).Value).Shapes.Paste
.LockAspectRatio = msoFalse
.Align msoAlignCenters, False
.Align msoAlignMiddles, False
.Align msoAlignLefts, True
.Align msoAlignTops, True
.Height = Application.InchesToPoints(5.49)
.Width = Application.InchesToPoints(5.12)
.Left = Application.InchesToPoints(0.8)
End With
尝试这样的事情:
With PPPres.Slides(pptcel.Offset(0, -8).Value)
.Shapes.Paste
With .Shapes(.Shapes.Count)
.LockAspectRatio = msoTrue
.Left = 25
.Top = 25
.Height = 200
End With
End With
相应地更改 属性 设置。
每当我粘贴一个从 excel 到 VBA 的具有预期大小的形状时,大小总是不同的。确切地说, .Left
部分。
这是我的代码的简短版本:
With PPTPres.Slides(pptcel.Offset(0, -8).Value).Shapes.Paste
.LockAspectRatio = msoFalse
.Align msoAlignCenters, False
.Align msoAlignMiddles, False
.Align msoAlignLefts, True
.Align msoAlignTops, True
.Height = Application.InchesToPoints(5.49)
.Width = Application.InchesToPoints(5.12)
.Left = Application.InchesToPoints(0.8)
End With
尝试这样的事情:
With PPPres.Slides(pptcel.Offset(0, -8).Value)
.Shapes.Paste
With .Shapes(.Shapes.Count)
.LockAspectRatio = msoTrue
.Left = 25
.Top = 25
.Height = 200
End With
End With
相应地更改 属性 设置。