2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PowerPointのスライドを画像ファイルとしてExportするVBScript

Posted at

##使い方
vbsファイルのアイコンにPowerPointファイルを Drag & Dropすると
PowerPointの各スライドを画像ファイルとして出力します。

##コード

'[PowerPointExport.vbs]'

Option Explicit
Dim p, f, s
With CreateObject("PowerPoint.Application")
    Set p = .Presentations.Open(WScript.Arguments(0), -1, 0, 0)
    With CreateObject("Scripting.FileSystemObject")
        f = .BuildPath(.GetParentFolderName(WScript.ScriptFullName), p.Name)
        If Not .FolderExists(f) Then .CreateFolder f
        For Each s In p.Slides
            s.Export .BuildPath(f, s.SlideNumber & ".png"), "png"
        Next
    End With
    .Quit
End With
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?