Notice
Recent Posts
Recent Comments
«   2025/07   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
07-21 10:50
Today
Total
관리 메뉴

해킹공주의 일상

[Word] 사진 일괄 크기 변경 본문

지식 창고/개발 및 업무자동화

[Word] 사진 일괄 크기 변경

h4ckpr1n 2023. 3. 12. 03:26
Private Function AspectHt( origWd As Long, origHt As Long, newWd As Long) As Long

If origWd <> 0 Then

AspectHt = (CSng(origHt) / CSng(origWd)) * newWd

Else

AspectHt = 0

End If

End Function

 

Sub Figure_Attributes()
 

Dim oShp As Shape

Dim oILShp As InlineShape

 

For Each oShp In ActiveDocument.Shapes

With oShp

.Height = AspectHt(.Width, .Height, CentimetersToPoints(8)) '원하는 숫자 입력 cm

.Width = CentimetersToPoints(8) '원하는 숫자 입력

End With

Next

 

For Each oILShp In ActiveDocument.InlineShapes

With oILShp

.Height = AspectHt(.Width, .Height, CentimetersToPoints(8)) '원하는 숫자 입력

.Width = CentimetersToPoints(8) '원하는 숫자 입력

End With

Next

End Sub
Comments