【问题标题】:How would I modify this code to shrink the pasted image by 50%我将如何修改此代码以将粘贴的图像缩小 50%
【发布时间】:2017-12-05 01:15:21
【问题描述】:
Sub Tester()
    Sheet1.Range("D5:E16").Copy
    Sheet2.Activate
    Sheet2.Range("A1").Select
    ActiveSheet.Pictures.Paste Link:=True
    Application.CutCopyMode = False
End Sub

如何在粘贴时将图像缩小一个倍数??

【问题讨论】:

    标签: vba image copy range shrink


    【解决方案1】:

    要调整图片大小,您可以使用以下命令:

    Picture.ShapeRange.Width = 0.5 * Picture.Width
    Picture.ShapeRange.Height = 0.75 * Picture.Height
    

    可以找到更深入的示例here。我喜欢将粘贴和调整大小部分分开,这样可以保持代码的灵活性。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多