- ·上一篇:PowerPoint幻灯片的加入一页的问题
- ·下一篇:淘宝客服热线电话是多少
如何将多张图片制作成一个PowerPoint幻灯片?每个幻灯片放一个图片
1.如何将多张图片制作成一个PPT?每个幻灯片放一个图片
这个可以用VBS来做。如下步骤可自动将某个文件夹下面的JPG图片按照每个图片一张幻灯片的形式生成一个PPT文件。
1、创建并保存一个VBS文件(比如“批量导入图片.vbs”)包含如下代码:
Option Explicit
Const strRootPath = "D:\Downloads\Pictures\"
Dim oApplication, oPresentation, oShape, fso, oFolder, oFile, oLayout, oSlide
Set oApplication = CreateObject("PowerPoint.Application")
oApplication.Visible = True
Set oPresentation = oApplication.Presentations.Add()
Set fso = CreateObject("Scripting.FileSystemObject")
Set oFolder = fso.GetFolder(strRootPath)
For Each oFile In oFolder.Files
If LCase(fso.GetExtensionName(oFile.Path)) = "jpg" Then
Set oSlide = oPresentation.Slides.AddSlide(oPresentation.Slides.Count + 1, oPresentation.SlideMaster.CustomLayouts(1))
Set oShape = oSlide.Shapes.AddPicture(oFile.Path, 0, -1, 0, 0)
If oShape.Width < oPresentation.PageSetup.SlideWidth Then oShape.Left = (oPresentation.PageSetup.SlideWidth - oShape.Width) / 2
If oShape.Height < oPresentation.PageSetup.SlideHeight Then oShape.Top = (oPresentation.PageSetup.SlideHeight - oShape.Height) / 2
End If
Next
Set fso = Nothing
Set oFolder = Nothing
Set oSlide = Nothing
Set oLayout = Nothing
Set oShape = Nothing
Set oPresentation = Nothing
2、修改其中的图片文件夹路径为你存放图片的目录;
3、在资源管理器中双击这个vbs文件,PowerPoint将自动打开并把所有图片导入成一幅图片一张幻灯片。