스크린샷 붙여넣기 및 크기 조정

스크린샷 붙여넣기 및 크기 조정

나는 종종 임의의 그림을 스크린샷으로 찍는데 매크로를 사용하여 크기를 조정하고 싶습니다. 매크로가 스크린샷을 자동으로 붙여넣은 다음 높이 5.9인치, 너비 10인치에 맞게 크기를 조정하도록 하고 싶습니다. 제가 사용하고 있는 현재 매크로는 스크린샷이 크지 않은 한 완벽하게 작동하지만(높이) 가장 가까운 너비(10) 또는 높이(5.9) 중 어느 것이 먼저 나오든 조정하고 싶습니다. 어떤 제안이 있으십니까?

카일

Sub Resize()

  If ActiveDocument.Shapes.Count = 3 Then
    ActiveDocument.Shapes(3).Select
    Selection.shapeRange.Delete
  End If
  Application.ScreenUpdating = False
  Selection.Paste
  If ActiveDocument.InlineShapes.Count = 1 Then
    ActiveDocument.InlineShapes(1).ConvertToShape
  End If
  If ActiveDocument.Shapes.Count = 3 Then
    With ActiveDocument.Shapes(3)
      .WrapFormat.Type = wdWrapFront
      .LockAspectRatio = msoTrue
      .Height = InchesToPoints(5.9)
     ' .Width = InchesToPoints(10)

      .RelativeHorizontalPosition = wdRelativeHorizontalPositionPage
     .RelativeVerticalPosition = wdRelativeVerticalPositionPage
      .Top = InchesToPoints(0.8) 
      .Left = wdShapeCenter 
    End With
  End If
  Application.ScreenUpdating = True
End Sub

관련 정보