如何将多张图片制作成一个PPT?每个幻灯片放一个图片
发布网友
发布时间:2022-02-22 23:24
我来回答
共3个回答
热心网友
时间:2022-02-23 00:53
这个可以用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将自动打开并把所有图片导入成一幅图片一张幻灯片。
热心网友
时间:2022-02-23 02:11
是统一制作母版吗
热心网友
时间:2022-02-23 03:46
复制,粘贴