[파일] - [옵션] - [리본 사용자 지정] - [명령선택, 매크로] - [바로가기키, 사용자 지정]
※ [파일] - [옵션] 단축키 : Alt + F + T
[명령 지정,매크로] - [키보드 시퀀스 지정] - [지정]
Alt + F8(매크로 설정창), Alt + F11(매크로 코드 편집기)
※ 단축키 설정 백업 파일
C:\Users\사용자이름\AppData\Roaming\Microsoft\Templates Normal.dotm 파일
※ 매크로 설정 파일 추출 - Alt + F11 - 모듈 우클릭 후 파일 내보내기
ி 매크로 모음
모든 이미지의 너비 및 테두리 설정
Sub set_image_width_board()
For i = 1ToActiveDocument.InlineShapes.Count'for 문으로 1번째 그림부터 마지막 그림까지
WithActiveDocument.InlineShapes(i)
.Width = CentimetersToPoints(16.5) ' 그림너비 16.5cm로 통일
With .Borders
.OutsideColor = wdColorBlack '그림테두리 검정색
.OutsideLineStyle = wdLineStyleSingle '그림테두리 실선
.OutsideLineWidth = wdLineWidth075pt '그림테두리 두께 0.75pt로 통일
EndWithEndWithNextEndSub
모든 이미지의 종횡비(가로 세로 비율) 고정 해제
SubUnlockAspectRatio()
Dim shp AsShapeDim ish AsInlineShapeForEach shp InActiveDocument.ShapesIf shp.Type = msoPicture Or _
shp.Type = msoLinkedPicture Then
shp.LockAspectRatio = FalseEndIfNext shp
ForEach ish InActiveDocument.InlineShapesIf ish.Type = wdInlineShapePicture Or _
ish.Type = wdInlineShapeLinkedPicture Then
ish.LockAspectRatio = FalseEndIfNext ish
EndSub
선택한 이미지의 너비 및 테두리 설정
SubSelected_image_w_board()
WithSelection.InlineShapes(1) ' 가로 종횡비 고정 x
.LockAspectRatio = False
.Width = CentimetersToPoints(16.5)
With .Borders
.OutsideColor = wdColorBlack '그림테두리 검정색
.OutsideLineStyle = wdLineStyleSingle '그림테두리 실선
.OutsideLineWidth = wdLineWidth075pt '그림테두리 두께 0.75pt로 통일
EndWithEndWithEndSub