2015-12-01 25 views
0

我试图制作一个宏,它可以将所有PowerPoint演示文稿中的所有文本更改为指定字体和fontsize(通过InputBoxes给出)。VBA powerpoint - 用于格式化笔记的宏

它似乎工作,但不是在所有的幻灯片,一些幻灯片它只是重置字体大小的东西方式比给出。任何人都知道会出现什么问题?

Sub FormatNotes() 

    Dim intSlide As Integer 
    Dim strNotes As String 
    Dim nts As TextRange 
    Dim strFont, intSize 

    intSize = InputBox("Please enter font size", "fontsize", "12") 
    strFont = InputBox("Please enter font", "font type", "Calibri") 

     With ActivePresentation 

      For intSlide = 1 To .Slides.Count 
      Set nts = ActivePresentation.Slides(intSlide).NotesPage. _ 
      Shapes.Placeholders(2).TextFrame.TextRange 
      With nts 
       If intSize = "" Then intSize = 12 
       .Paragraphs.Font.Size = intSize 
       .Paragraphs.Font.Name = strFont 

     End With 

      Next intSlide 
    End With 
    MsgBox ("FormatNotes uitgevoerd") 

End Sub 

回答

0

似乎工作给我。我也在删除后试过它。如果你想将整个文本设置为相同类型的面和大小,你不需要这样做。你有没有一个不适合调查的例子?

顺便说一句,你知道在PowerPoint中默认不显示Notes格式并且必须在Outline视图中打开吗?