1.在PPT中插入水印
2. 水印中的标号是有顺序的,egC001,C002,C003
3. 批量导出pdf
Sub 插入()
Dim filename As String
Dim file_add As String
Dim file_suffix As String
Dim index_name As String
file_path = "C:\Users\mikowoo\Desktop\001\result\"
file_suffix = ".pdf"
For i = 1 To 111
If i >= 1 And i <= 9 Then
index_name = "C00" & i
ActivePresentation.Designs(1).SlideMaster.Shapes("文本框 2").TextFrame.TextRange.Text = index_name
ActivePresentation.Designs(1).SlideMaster.Shapes("文本框 4").TextFrame.TextRange.Text = index_name
filename = file_add & "销售顾问的一天" + index_name + file_suffix
ActivePresentation.SaveAs filename, ppSaveAsPDF
'Debug.Print filename
Else
If i >= 10 And i <= 99 Then
index_name = "C0" & i
ActivePresentation.Designs(1).SlideMaster.Shapes("文本框 2").TextFrame.TextRange.Text = index_name
ActivePresentation.Designs(1).SlideMaster.Shapes("文本框 4").TextFrame.TextRange.Text = index_name
filename = file_add & "销售顾问的一天" + index_name + file_suffix
ActivePresentation.SaveAs filename, ppSaveAsPDF
'Debug.Print filename
Else
index_name = "C" & i
ActivePresentation.Designs(1).SlideMaster.Shapes("文本框 2").TextFrame.TextRange.Text = index_name
ActivePresentation.Designs(1).SlideMaster.Shapes("文本框 4").TextFrame.TextRange.Text = index_name
filename = file_add & "销售顾问的一天" + index_name + file_suffix
ActivePresentation.SaveAs filename, ppSaveAsPDF
'Debug.Print filename
End If
End If
Next i
End Sub