ppt 如何用vba統一設置圖片大小 位置 全選圖片 全部圖片


Sub test()
'獲取所有ppt頁面
For Each currentSlide In ActivePresentation.Slides

 

'每個頁面加一個文本框

Set Sh = currentSlide.Shapes.AddLabel(msoTextOrientationHorizontal, 80, 30, 150, 100)

Sh.TextFrame.TextRange.Text = "如圖所示:"
Sh.TextFrame.TextRange.Font.Color = RGB(226, 17, 0)
Sh.TextFrame.TextRange.Font.Size = 24

 '循環每個頁面
    For Each shp In currentSlide.Shapes
      'type = 13是圖片  17是文本框  
      If shp.Type = 13 Then
       shp.Top = 100 '設置top位置
       shp.Left = 270  '設置left位置
        shp.Height = 400 '設置圖片高度位置
        'shp.Width = 7
        End If
    Next shp

Next currentSlide
End Sub

  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM