小编Kan*_*hoi的帖子

用于打开和编辑多个Powerpoint文件的VBA

我有一个包含200多个Powerpoint文件的文件夹,我一直在努力使用宏打开每个文件,编辑它们,保存它们并在循环中关闭它们.我已经设法为编辑部分创建代码,但是我无法创建一个代码来选择文件夹中的每个文件.使用"*.pptx"似乎不起作用,为每个文件编写具有特定文件名的代码效率非常低.

有人有解决方案吗?

Sub SaveNotesText()

Dim oPres As Presentation
Dim oSlides As Slides
Dim oSlide As Slide
Dim oShapes As Shapes
Dim oSh As Shape
Dim NotesText As String
Dim FileNum As Integer
Dim PathSep As String

#If Mac Then
    PathSep = ":"
#Else
    PathSep = "\"
#End If

Set oPres = ActivePresentation
Set oSlides = oPres.Slides

For Each oSlide In oSlides
    NotesText = NotesText & "Slide " & oSlide.SlideIndex & vbCrLf
    Set oShapes = oSlide.NotesPage.Shapes
    For Each oSh …
Run Code Online (Sandbox Code Playgroud)

powerpoint vba batch-file powerpoint-vba

1
推荐指数
1
解决办法
7134
查看次数

标签 统计

batch-file ×1

powerpoint ×1

powerpoint-vba ×1

vba ×1