我目前具有以下设置。一切工作正常,除了.DateAndTime.Format不会更改幻灯片左下角的日期格式。日期显示为4/10/2020,但是我无法使用以下内容将其更改为2020年4月10日:
Set PowerPointApp = GetObject(class:="PowerPoint.Application")
Set myPresentation = PowerPointApp.Presentations.Add
myPresentation.ApplyTemplate "[template file here]"
Const ppSlideSizeA4Paper = 2
myPresentation.PageSetup.SlideSize = ppSlideSizeA4Paper
With myPresentation.SlideMaster.HeadersFooters
.SlideNumber.Visible = True
.DateAndTime.Visible = True
.DateAndTime.UseFormat = True
.DateAndTime.Format = ppDateTimeMMMMdyyyy
End With
[如果您使用的是后期绑定,则类似于
我认为您发现了一个错误,因为VBA不会更改母版或其子版式上的日期格式。可以在幻灯片上设置: