해킹공주의 일상
[Word] 사진 일괄 크기 변경 본문
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
'지식 창고 > 개발 및 업무자동화' 카테고리의 다른 글
[Excel] 인프라 진단 데이터 셀 정리 스크립트 (0) | 2023.05.19 |
---|---|
[Excel] 셀에 위아래로 공백삽입하기(vba) + 정돈하기 (0) | 2023.04.07 |
[Python] 엑셀파일 값 배열로 추출하기 (0) | 2022.12.05 |
BurpSuite 전송 패킷 내 단어 검색 툴_숨은버프패킷찾기고수.exe (0) | 2022.12.01 |
[AUTOGUI] AUTOGUI 사용법(feat. 오토핫키) (0) | 2022.12.01 |
Comments