엑셀자료 사용 안내 엑셀 매크로(VBA)를 이용하여 만든 간단한 프로그램과 엑셀 매크로(VBA)를 배울 수 있는 강좌가 있습니다.따라서, 대부분 프로그램을 이용하기 위해서는 엑셀 매크로 사용하기 설정을 하여야 합니다. (1.보안설정) 클릭 (2.개발도구설정) 클릭 3.매크로 차단 해제 방법

엑셀로 PPT(프리젠테이션) 파일을 일괄료 만들어 보기

 

영어 단어장 또는 일본어 단어장을 PPT로 만들어 줍니다.

회사에서 PPT로 발표할때, 데이터를 이용해서 한꺼번에 PPT자료를 만들 수 있습니다.

 

이곳에서 만드는 PPT는 텍스트뿐만 아니라, 이미지, 그리고 음성 미디어 파일을 한꺼번에 PPT파일로 만들어 줍니다.

 

아래 유튜브 동영상이 바로 이 프로그램을 이용해서 만든 PPT입니다. 

 

사용법은 간단합니다.

 

1. PPT 파일을 미리 만들어야 합니다. (PPT파일 서식을 넣어 놓은 PPT파일 입니다)

   메뉴 - 보기 - 슬라이드 마스터

   제목과 텍스트1, 텍스트 2를 만들어 저장합니다.

2. 본 프로그램으로 만들어 놓은 PPT파일을 선택합니다.

3. 데이터 칼럼 및 이미지 크기 등을 지정합니다.

4. PPT파일 일괄 생성 버튼을 클릭합니다.

 
이미지 2.png

 

파일은 다음과 같습니다.

 

1. 엑셀 파일 엑셀To파워포인트(지천명영어)_02.xlsm

2. PPT파일 test_ppt.pptx

 

소스코드는 다음과 같습니다.

 

 

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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
Option Explicit
 
Sub 피피티_파일선택()
 
Dim i_fullpath, i_file, i_folder As String
    
With Application.FileDialog(msoFileDialogOpen)
    .AllowMultiSelect = False
    .InitialFileName = ThisWorkbook.Path & "\"
    .Filters.Clear
    .Filters.Add "PPT 파일을 선택하세요", "*.ppt*"
    
    If .Show = True Then
        i_fullpath = .SelectedItems(1)
        
        i_file = Right(i_fullpath, Len(i_fullpath) - InStrRev(i_fullpath, "\"))
        i_folder = Left(i_fullpath, Len(i_fullpath) - Len(i_file))
        
    End If
End With
 
    If i_file = "" Then Exit Sub
        
        Cells(45= i_folder
        Cells(55= i_file
 
End Sub
Sub 피피티_폴더선택(i_caption As String)
 
Dim i_folder As String
    
    With Application.FileDialog(msoFileDialogFolderPicker)
        .InitialFileName = Cells(45)
        If .Show = -1 Then
            i_folder = .SelectedItems(1)
        End If
    End With
    
    If i_folder = "" Then Exit Sub
    
    If i_caption = "음성1폴더" Then
        Cells(125= i_folder
    
    ElseIf i_caption = "음성2폴더" Then
        Cells(135= i_folder
    
    End If
 
End Sub
 
Sub ExcelToPPT()
 
Dim i_sheet, j_sheet, t_sheet As Worksheet
 
Set i_sheet = Sheets("대쉬보드")
Set j_sheet = Sheets("데이터")
 
'작업할 PPT 파일 및 폴더 정보
 
Dim i_power_point As PowerPoint.Application
Dim i_presentation As PowerPoint.Presentation
Dim i_slide As PowerPoint.Slide
 
'파워포인트 슬라이드 열기
Dim i_ppt_folder, i_ppt_file As String
 
i_ppt_folder = i_sheet.Cells(45)
i_ppt_file = i_sheet.Cells(55)
    
    Set i_power_point = New PowerPoint.Application
    
    On Error Resume Next
        Set i_presentation = i_power_point.Presentations(i_ppt_file)
        If Err.Number <> 0 Then
            Set i_presentation = i_power_point.Presentations.Open(i_ppt_folder & i_ppt_file, msoFalse)
            Err.Clear
        End If
    On Error GoTo 0
    
    i_power_point.Visible = True
    i_power_point.Activate
 
 
'엑셀 워크 쉬트에서 작업하기
 
'i, j, ii, jj 변수는 루핑용 변수임, MR = MaxRow를 뜻하며, 데이터가 있는 마지막 셀번호
Dim i, j, ii, jj, MR   As Integer
Dim i_count As Integer
 
 
MR = i_sheet.Cells.Find("*", , , , xlByRows, xlPrevious).Row
 
i_count = i_presentation.Slides.Count
 
'만약 기존슬라이드가 1장보다 많을때는. 슬라이드 앞 1장만 남기기
If i_count > 1 Then
 
    For ii = i_count To 2 Step -1
        i_presentation.Slides(ii).Delete
    Next ii
 
    i_count = 1
 
End If
 
 
'데이터 칼럼(열)의 속성(텍스트, 이미지, mp3 지정)
Dim i_col_txt_1, i_col_txt_2, i_col_img_1 As Integer
 
i_col_txt_1 = i_sheet.Cells(85)
i_col_txt_2 = i_sheet.Cells(95)
i_col_img_1 = i_sheet.Cells(105)
 
Dim i_img_top, i_img_left, i_img_size As Integer
 
i_img_top = i_sheet.Cells(117)
i_img_left = i_sheet.Cells(118)
i_img_size = i_sheet.Cells(119)
 
Dim i_folder_mp3_1, i_folder_mp3_2 As String
 
i_folder_mp3_1 = i_sheet.Cells(125)
i_folder_mp3_2 = i_sheet.Cells(135)
 
 
'슬라이드에 엑셀 텍스트, mp3파일, 이미지 붙여넣기
Dim i_audio_shape, i_audio_shape2 As Object
Dim i_effect, i_effect2 As Effect
Dim i_audio_file As String
 
Dim i_picture As Object
 
For i = 2 To MR
    
    '텍스트 1이 빈칸이면 루프 스킵
    If j_sheet.Cells(i, i_col_txt_1) = "" Then GoTo end_of_for_i
    
    Set i_slide = i_presentation.Slides.Add(i_count, ppLayoutCustom)
        
    i_audio_file = "" & Format(i_count, "00"& ".mp3"
 
 
    '슬라이드에 엑셀 텍스트를 텍스트로 그냥 넣기
    With i_slide
        
        If i_col_txt_1 <> 0 Then .Shapes(1).TextEffect.Text = j_sheet.Cells(i, i_col_txt_1)
        If i_col_txt_2 <> 0 Then .Shapes(2).TextEffect.Text = j_sheet.Cells(i, i_col_txt_2)
 
    End With
 
    '슬라이드에 엑셀 텍스트를 이미지로 변경해서 넣기
    If i_col_img_1 <> 0 Then
        j_sheet.Cells(i, i_col_img_1).CopyPicture xlScreen, xlPicture
        With i_slide
            .Shapes.PasteSpecial
            With .Shapes(.Shapes.Count)
            
                .Left = i_img_top
                .Top = i_img_left
                .Width = i_img_size
            
            End With
        End With
    
    End If
    
    
    '슬라이드에 미디어파일 넣기
    
    If i_folder_mp3_1 <> "" Then
        Set i_audio_shape = i_slide.Shapes.AddMediaObject2(i_folder_mp3_1 & "\" & i_audio_file, msoFalse, msoTrue, 10, 10)
            Set i_effect = i_slide.TimeLine.MainSequence.AddEffect(i_audio_shape, msoAnimEffectMediaPlay, , msoAnimTriggerWithPrevious)
            With i_effect
                .EffectInformation.PlaySettings.HideWhileNotPlaying = True
            End With
    End If
    
    If i_folder_mp3_2 <> "" Then
        Set i_audio_shape2 = i_slide.Shapes.AddMediaObject2(i_folder_mp3_2 & "\" & i_audio_file, msoFalse, msoTrue, 10100)
            Set i_effect2 = i_slide.TimeLine.MainSequence.AddEffect(i_audio_shape2, msoAnimEffectMediaPlay, , msoAnimTriggerWithPrevious)
            i_effect2.MoveTo 1
            With i_effect2
                .EffectInformation.PlaySettings.HideWhileNotPlaying = True
            End With
    
    End If
    i_count = i_count + 1
 
end_of_for_i:
Next i
    
    Set i_presentation = Nothing
    Set i_power_point = Nothing
     
End Sub
 
 
cs
  • ?
    시소대디 2023.02.12 13:21

    컴퓨터를 잘 모르는 40대입니다. 강의하신 내용을 잘 따라 한다고 하며 설정도 바꾸고 올려주신 파일 지천명영어와 피피티 테스트를 폴더도 00 13기병으로 만들어 실행했는데 "91 런타임오류 디버그하시겠습니까" 뭐 이런 내용이 자꾸 나와서 엑셀언어? 컴퓨터 언어를 모르는 제게는 너무 따라하기 어렵네요. 처음부터 배워야 이런것도 따라할수 있겠죠?

  • profile
    지천명영어 2023.02.14 15:50
    이곳에 사용된 프로그램은 VBA로 상당한 컴퓨터 지식을 요구합니다. 하루 이틀에 배우기는 좀 어렵습니다.

    만약 시소대디님께서, 어떤 목적으로 이 프로그램을 이용하시는지 알 수 있을까요?
    만들고 싶은 목적 파일을 주시면, 제가 알아봐 드리겠습니다.

    감사합니다.
  • ?
    천재 2023.10.02 09:04

    천재에요!

  • ?
    피피티노예 2024.04.04 03:10

    안녕하세요. 온갖 검색과 따라하기 챗지티피에게 무한 물음표를 남기며 6시간의 사투끝에 이 곳을 발견하여 고견을 얻고자 댓글을 남겨드립니다. Vba 라는게 있다 정도의 지식을 가지고 있는 사람인데 현생에서 가진 직업이 노가다로 가격표를 하나하나 피피티에 복붙해야하는 불운한 운명을 타고난 사람인데요…혼자 해보려고 하지만 자꾸 오류가 떠서 조언을 얻고자 글을 남겼습니다. 혹시 제가 도움을 요청해도 괜찮을까요? 

사진 및 파일 첨부

여기에 파일을 끌어 놓거나 왼쪽의 버튼을 클릭하세요.

파일 용량 제한 : 0MB (허용 확장자 : *.*)

0개 첨부 됨 ( / )

  1. 엑셀 프로그램 요청하기(무료 또는 책 구입 후원)

    Date2021.06.07 By지천명영어 Views1265
    read more
  2. 엑셀 VBA로 PDF파일 페이지 나누기

    Date2022.12.13 By지천명영어 Views572
    Read More
  3. 이미지 속에 있는 표를 OCR로 인식 후, 테이블 데이터로 만들기

    Date2022.12.11 By지천명영어 Views1622
    Read More
  4. 엑셀 스크롤바 일치 시키기(UsedRange 에러)

    Date2022.11.24 By지천명영어 Views212
    Read More
  5. 엑셀 다운로드 후 매크로 차단(보안 위험 Microsoft는 이 파일의 출처를 신뢰할 수 없기 때문에 매크로 실행을 차단했습니다.

    Date2022.11.13 By지천명영어 Views5601
    Read More
  6. 엑셀 리본메뉴 imageMso (이미지 아이콘 검색)

    Date2022.08.25 By지천명영어 Views749
    Read More
  7. 수도쿠로 숫자와 친해지기(엑셀 매크로(VBA)로 스도쿠 프로그램 만들기(1/3)(2022.6.4 압데이트)

    Date2022.06.01 By지천명영어 Views1165
    Read More
  8. 엑셀 공백 행. 열 전부 삭제 (엑셀에서 공란인 행과 열을 찾아서 한번에 삭제해 줍니다.)

    Date2022.05.27 By지천명영어 Views4348
    Read More
  9. 파파고와 구글번역을 한번에(지천명영어) 프로그램 사용법

    Date2022.05.24 By지천명영어 Views2328
    Read More
  10. 엑셀 표를 웹형식의 html 코드로 만들기(글꼴 설정, 셀병합 , 하이퍼링크 , 테두리 표시 등을 코드로 만들어 줍니다.)

    Date2022.05.23 By지천명영어 Views3784
    Read More
  11. 대법원 부동산 경매 물건 검색 크롤링(엑셀) - 타 프로그램 없이 직접 엑셀에서 경매 물건 검색

    Date2022.05.13 By지천명영어 Views2491
    Read More
  12. 엑셀로 PPT파일을 자동으로 만들기

    Date2022.04.18 By지천명영어 Views5515
    Read More
  13. 영어, 일본어 듣기 공부 용 mp3 파일 가사 만들기 - 일괄 만들기

    Date2022.04.10 By지천명영어 Views488
    Read More
  14. 일본어 한자 후리가나 자동입력 및 파파고 한글번역 그리고, 구글 영어번역까지 한번에

    Date2021.11.17 By지천명영어 Views1726
    Read More
  15. MS오피스 언어가 일본어로 나올 때 한국어로 바꾸기

    Date2021.10.31 By지천명영어 Views1995
    Read More
  16. PDF 영어문장 합치기(PDF 문서 영어 글자를 정상적인 영문으로 일괄 바꿔주기)

    Date2021.06.28 By지천명영어 Views1066
    Read More
  17. 엑셀에 마이크로소프트(MS) 영어 음성합성시스템(TTS) 설치하기

    Date2021.06.13 By지천명영어 Views1053
    Read More
  18. 따옴표 없이 엑셀 글자 복사하기

    Date2021.06.08 By지천명영어 Views6678
    Read More
  19. 구글 번역을 엑셀로, 텍스트 문장을 한꺼번에 구글 번역하기

    Date2021.06.07 By지천명영어 Views5596
    Read More
  20. 엑셀 비어있는 셀(공란인 행 또는 열) 한번에 삭제하기

    Date2021.06.05 By지천명영어 Views2762
    Read More
  21. 엑셀 책 쪽수 자동 계산하는 법

    Date2021.06.05 By지천명영어 Views499
    Read More
Board Pagination Prev 1 2 Next
/ 2

LOGIN

SEARCH

MENU NAVIGATION