미리캔버스 디자인을 텍스트 편집 가능 옵션으로 다운로드 받아서
슬라이드 마스터에 들어가보면 디자인 틀이 왼쪽 상단에 치우쳐져 있습니다.
슬라이드 크기도 16:9인 경우 50.8cm * 28.575 로 조금 큰 사이즈입니다.
글꼴 또한 영문이 기본 폰트이고 한글 글꼴은 알 수 없는 글꼴이름입니다.
더불어서 글머리 기호 또한 65535 문자로 물음표로 나오게 됩니다.
이런 경우 첨부한 VBA 매크로를 이용하면 슬라이드 마스터를 화면에 가득차게 바꾸고
기본 한글 글꼴과 영문 글꼴을 '맑은 고딕'으로 바꾸며
글머리 기호를 8828 기본 가운뎃점으로 바꿉니다.
더보기
Option Explicit
Dim SW!, SH!, SW1!, SH1!
Sub ResetSlideMaster()
Dim pres As Presentation, pres1 As Presentation
Dim layout As CustomLayout, sld As Slide, shp As Shape
'Original/ New Slide size
Set pres = ActivePresentation
With pres.PageSetup
'.SlideSize = ppSlideSizeOnScreen16x9
'.SlideWidth = cm2pt(33.867)
'.SlideHeight = cm2pt(19.05)
'DoEvents
SW1 = .SlideWidth
SH1 = .SlideHeight
SW = SW1 / 2
SH = SH1 * 2 / 3
End With
'custom layout firset
For Each layout In pres.Designs(1).SlideMaster.CustomLayouts
For Each shp In layout.Shapes
ResizeShp shp
ResetBullet shp '글머리 재지정
'RemoveBullet shp
Next shp
Next layout
'slidemaster layout
For Each shp In pres.Designs(1).SlideMaster.Shapes
ResizeShp shp
ResetBullet shp '글머리 재지정
'RemoveBullet shp
Next shp
'reset to default font theme
LoadDefaultFontTheme
End Sub
Function ResizeShp(oShp As Shape)
Dim l!, t!, w!, h!
With oShp
l = .Left
t = .Top
w = .Width
h = .Height
.LockAspectRatio = msoFalse
.Width = SW1 / SW * w
.Height = SH1 / SH * h
.Left = SW1 / SW * l
.Top = SH1 / SH * t
.LockAspectRatio = msoTrue
End With
End Function
Function ResetBullet(oShp As Shape)
With oShp.TextFrame.TextRange.ParagraphFormat.Bullet
If .Character = 65533 Then _
.Character = 8226 '가운데 점
'글머리가 숫자가 아니면 지우기
'If Not .Type = ppBulletNumbered Then
' .Type = ppBulletNone
'End If
End With
End Function
Function RemoveBullet(oShp As Shape)
With oShp.TextFrame.TextRange.ParagraphFormat.Bullet
If Not .Type = ppBulletNumbered Then
.Type = ppBulletNone
End If
End With
End Function
Function LoadDefaultFontTheme()
With ActivePresentation
.Designs(1).SlideMaster.Theme.ThemeFontScheme.Load .Path & "\" & "FontTheme.thm"
End With
End Function
Function cm2pt(cm As Single) As Single
cm2pt = cm * 28.346 '1cm => 28.3465pt
End Function
슬라이드 크기가 커서 폰트 크기는 좀 줄어듭니다.
샘플 파일을 첨부합니다. FontTheme.thm 은 기본 글꼴 테마입니다.
'PPT+VBA' 카테고리의 다른 글
[Chart Merge] 차트 복제하여 엑셀 데이터 일괄 반영 (0) | 2022.08.06 |
---|---|
텍스트박스를 일괄 도형으로 변환하기 (0) | 2022.07.10 |
[Web Viewer 추가기능]온라인 구글문서 PPT슬라이드에 띄우기 (1) | 2022.06.24 |
도형의 윤곽선은 안쪽 정렬도 가능 (1) | 2022.06.04 |
ppt파일 목차 자동으로 만들기 (0) | 2022.05.23 |
슬라이드 크기 변경할 때 자동으로 개체 가로:세로 비율 적용하기 (0) | 2022.05.18 |
표(테이블)안의 셀 텍스트에 윤곽선 서식 적용하기 (2) | 2022.05.15 |
현재 페이지/ 총 페이지 자동 업데이트 (2) | 2022.05.14 |
최근댓글