Sub ChangeFontSize()
Dim slide As slide
Dim shape As shape
For Each slide In ActivePresentation.Slides
For Each shape In slide.Shapes
If shape.HasTextFrame Then
shape.TextFrame.TextRange.Font.Size = 24
End If
Next shape
Next slide
End Sub
Sub SaveAsPDF()
Dim pptName As String
Dim PDFName As String
pptName = ActivePresentation.FullName
PDFName = Left(pptName, InStr(pptName, ".")) & "pdf"
ActivePresentation.ExportAsFixedFormat PDFName, ppFixedFormatTypePDF
End Sub
特定のテキストを検索して置換する
Sub FindAndReplaceText()
Dim slide As slide
Dim shape As shape
For Each slide In ActivePresentation.Slides
For Each shape In slide.Shapes
If shape.HasTextFrame Then
shape.TextFrame.TextRange.Replace "旧テキスト", "新テキスト"
End If
Next shape
Next slide
End Sub
コメント