我有一個PowerPoint與每張幻燈片的筆記。對於每張幻燈片,我想複製筆記,創建一個帶黑色邊框的黃色矩形,並將筆記粘貼到矩形中。PowerPoint宏 - 需要添加矩形和註釋到每個幻燈片
我開始「拼接」一個宏。這是我到目前爲止。它的工作原理,但矩形是在頂部(需要在底部),不知道如何註釋複製並粘貼到矩形:
Dim oPPT As Presentation
Dim oSlide As Slide
Dim r As Integer
Dim i As Integer
Dim shapectr As Integer
Dim maxshapes As Integer
Dim oShape As Shape
Set oPPT = ActivePresentation
For i = 1 To oPPT.Slides.Count
For shapectr = 1 To oPPT.Slides(i).Shapes.Count
ActiveWindow.View.GotoSlide i
Set oShape = ActiveWindow.Selection.SlideRange.Shapes.AddShape(msoShapeRectangle, 575.5, 9.12, 124.75, 34.12)
oShape.Fill.ForeColor.RGB = RGB(255, 255, 204)
oShape.Fill.BackColor.RGB = RGB(137, 143, 75)
With oShape
With .TextFrame.TextRange
.Text = "TEST"
With .Font
.Name = "Arial"
.Size = 18
.Bold = msoFalse
.Italic = msoFalse
.Underline = msoFalse
.Shadow = msoFalse
.Emboss = msoFalse
.BaselineOffset = 0
.AutoRotateNumbers = msoFalse
.Color.SchemeColor = ppForeground
End With
End With
End With
Next shapectr
Next i
我需要更換「TEST」與那就是在音符區域中的文本的幻燈片(可能是幾句話)。
我感謝您的幫助!
這太棒了!還有一個問題---我想把盒子做成相同的大小,並穿過整個幻燈片。我用什麼命令來設置大小? (我知道我需要替換「oshp.TextFrame.AutoSize .....」聲明。非常感謝您的幫助!!! – user3264432
ActivePresentation.PageSetup.SlideHeight和.SlideWidth將返回當前演示文稿幻燈片的高度和寬度 –
我有幾個問題/調整: – user3264432