PowerPoint 宏功能快速批量插入图片
时间:2023-02-19 03:40:32
Powerpoint技巧:快速插入100张图片.当微软的Office与微软VB中的宏功能相遇时,便可以创造出强大的功能,例如在这篇文章中就介绍了利用这两个工具瞬间插入上百张图片。
如果要插入几十甚至几百张图片,并且要求每张图片插入到每张幻灯片页面上(即有几张照片就要有几张幻灯片)你会怎么做?
按照常用的方法点击“插入→图片→来自文件”菜单命令,然后一个一个选择需要的图片,或者点击“格式→背景”命令,将图片作为PowerPoint的背景导入,这样也太浪费时间了。在这种情况下,可以借助PowerPoint强大的宏功能,将多步操作合并为一步,批量插入图片。
第一步:首先准备好图片,假设在C盘下面的Pictures文件夹内有100张jpg格式的图片,如“C:Pictures1.jpg”、“C:Pictures2.jpg”、“C:Pictures3.jpg”等,文件名是有序的数字
第二步:启动PowerPoint 2003,按下Alt+F11键打开Visual Basic编辑器窗口,点击“插入→模块”菜单命令,在弹出的代码编辑窗口中输入以下代码:
Sub InsertPic()
Dim i As Integer
For i = 1 To ActivePresentation.Slides.Count
ActivePresentation.Slides(i).Select
With ActiveWindow.Selection.SlideRange
.FollowMasterBackground = msoFalse
.Background.Fill.UserPicture "C:Pictures" & i & ".jpg"
End With
Next
End Sub
第三步:关闭Visual Basic编辑器窗口,上面的模块代码会自动保存。此时,连续按Ctrl+M键建立与图片数目相等(如:100)的多个空白幻灯片。按Alt+F8键打开宏对话框,选中我们上面建立的InsertPic宏,点击“运行”即可,100张图片很快就自动插入到幻灯片中。
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Win10笔记本外接显示器分辨率怎么调?
![](https://img.aspxhome.com/file/2023/1/49351_0s.jpg)
win7网络连接不上解决方法
![](https://img.aspxhome.com/file/2023/29/a258081_0s.jpg)
笔记本win7wifi怎么打开?笔记本win7wifi打开教程
![](https://img.aspxhome.com/file/2023/30/a269291_0s.png)
win7系统注册表怎么还原到最初状态
![](https://img.aspxhome.com/file/2023/5/a316774_0s.jpg)
Win10进入安全模式后黑屏了怎么办?
![](https://img.aspxhome.com/file/2023/4/50394_0s.jpg)
系统之家如何快速安装Win11系统 系统之家安装Win11系统流程
![](https://img.aspxhome.com/file/2023/1/a273112_0s.png)
Windows11系统如何给开始菜单分组?
![](https://img.aspxhome.com/file/2023/27/a236598_0s.jpg)
Win10更新后开机变得很慢_Win10更新后开机变慢解决教程
![](https://img.aspxhome.com/file/2023/4/a308199_0s.jpg)
Win10将metro界面恢复为传统桌面的操作教程
![](https://img.aspxhome.com/file/2023/1/a281224_0s.jpg)
excel 如何筛选出符合条件的数据
![](https://img.aspxhome.com/file/2023/5/a154605_0s.jpg)
Win11怎么打开Windows移动中心?
![](https://img.aspxhome.com/file/2023/27/a235626_0s.jpg)
详细介绍dlss会降低画质吗的问题
![](https://img.aspxhome.com/file/2023/30/a268109_0s.jpg)
Wps怎么打分数
![](https://img.aspxhome.com/file/2023/6/a182076_0s.png)
Excel行列转之多列转换一列
![](https://img.aspxhome.com/file/2023/1/37631_0s.gif)
word页面竖向转横向
![](https://img.aspxhome.com/file/2023/7/34467_0s.gif)
Bongo cat Mver怎么固定在画面上?Bongo cat Mver固定在画面上教程
![](https://img.aspxhome.com/file/2023/30/a266887_0s.jpg)
PPT中怎么输入复杂的公式? ppt手写公式的教程
![](https://img.aspxhome.com/file/2023/10/a346063_0s.jpg )
iOS 16 小技巧:合并重复照片
![](https://img.aspxhome.com/file/2023/8/45038_0s.png)
盘点Mac上好用的颜色管理器
![](https://img.aspxhome.com/file/2023/3/a208513_0s.jpeg)
wps2019文档怎么显示行号?wps2019行号显示教程
![](https://img.aspxhome.com/file/2023/5/a166055_0s.jpg)