彰化一整天的論壇

 找回密碼
 立即註冊
搜索
查看: 117|回復: 0

【轉貼】Insert Image in a PowerPoint Presentation Using VBA

[複製鏈接]
發表於 2017-7-27 22:53:25 | 顯示全部樓層 |閱讀模式
  1. Sub main()
  2. Dim objPresentaion As Presentation
  3. Dim objSlide As Slide
  4. Dim objImageBox As Shape

  5. Set objPresentaion = ActivePresentation
  6. Set objSlide = objPresentaion.Slides.Item(2)

  7. Set objImageBox = objSlide.Shapes.AddPicture("C:\Users\Public\Pictures\Sample Pictures\Desert.jpg", msoCTrue, msoCTrue, 100, 100)
  8. End Sub
複製代碼
  1. objSlide.Shapes.Item(2).Top = 300
  2. objSlide.Shapes.Item(2).Left = 500
  3. objSlide.Shapes.Item(2).Width = 300
  4. objSlide.Shapes.Item(2).Height = 100
複製代碼



文章來源: http://software-solutions-online ... entation-using-vba/
回復

使用道具 舉報

您需要登錄後才可以回帖 登錄 | 立即註冊

本版積分規則

 ㄚ母滴雞湯
 員林香純滴雞精

Archiver|手機版|小黑屋|彰化一整天的論壇(Excel,Office)  |网站地图

GMT+8, 2018-1-16 19:37 , Processed in 0.028390 second(s), 12 queries , Apc On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表