text 如何使用新名称和文件扩展名快速保存演示文稿?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 如何使用新名称和文件扩展名快速保存演示文稿?相关的知识,希望对你有一定的参考价值。

Sub S()

Dim Ppres As Presentation
Set Ppres = ActivePresentation
Dim location As String
    
'~~~~~~~~~~~~saving in a location specified by us~~~~~~~~~~~~~~~~~~~~~

location = "C:\Users\Angelina\Review\MonthlyReview.pptx"
Ppres.SaveAs FileName:=location, FileFormat:=ppSaveAsDefault

'~~~~~~~~~~~saving in the same location as the exisitng presentaton
'~~~~~~~~~~~with a date 1 month back in the name~~~~~~~~~~~~~~~~~~~~~

Ppres.SaveAs FileName:=Left(Ppres.FullName, Len(Ppres.FullName) - 5) _
& "_" & Format(DateAdd("m", -1, Date), "mmm") & ".pptx"   

Ppres.Close
End Sub

以上是关于text 如何使用新名称和文件扩展名快速保存演示文稿?的主要内容,如果未能解决你的问题,请参考以下文章