HappyWeasel
여러 개의 PPT 파일 하나로 합치기 본문
1. 합쳐야 할 PPT 파일을 하나의 폴더 속에 넣어줍니다.
2. 메인이 될 PPT을 열어줍니다.
3. [매크로] - [Visual Basic]을 열어줍니다.
4. [해당 Project] - 오른쪽 마우스 - [삽입] - [모듈]
5. 아래의 링크의 Solution2의 내용을 복사하여 붙여 넣은 후 종료.
Sub InsertAllSlides()
' Insert all slides from all presentations in the same folder as this one
' INTO this one; do not attempt to insert THIS file into itself, though.
Dim vArray() As String
Dim x As Long
' Change "*.PPT" to "*.PPTX" or whatever if necessary:
EnumerateFiles ActivePresentation.Path & "\", "*.PPT", vArray
With ActivePresentation
For x = 1 To UBound(vArray)
If Len(vArray(x)) > 0 Then
.Slides.InsertFromFile vArray(x), .Slides.Count
End If
Next
End With
End Sub
Sub EnumerateFiles(ByVal sDirectory As String, _
ByVal sFileSpec As String, _
ByRef vArray As Variant)
' collect all files matching the file spec into vArray, an array of strings
Dim sTemp As String
ReDim vArray(1 To 1)
sTemp = Dir$(sDirectory & sFileSpec)
Do While Len(sTemp) > 0
' NOT the "mother ship" ... current presentation
If sTemp <> ActivePresentation.Name Then
ReDim Preserve vArray(1 To UBound(vArray) + 1)
vArray(UBound(vArray)) = sDirectory & sTemp
End If
sTemp = Dir$
Loop
End Sub
6. [매크로] - [매크로 보기]
매크로 선택 후 실행
'이모저모' 카테고리의 다른 글
Http header value 최대 크기 (0) | 2020.12.20 |
---|---|
IntelliJ - 초기 설정 (0) | 2020.11.05 |
레거시 코드 활용법 (우아한 형제들 블로그) (0) | 2019.04.18 |
테크플러스 프리미엄 콘텐츠 - ‘5G 충격파’ 총정리 (0) | 2019.04.06 |
Comments