[算表] 用EXCEL VBA獲得ppt裡的訊息
軟體:EXCEL
版本:2007
問題簡述:
我在A1儲存格中的文字有設定了一個超連結到一個給定的PowerPoint檔
我想用EXCEL VBA去獲取PowerPoint檔案中的某個字串
目前我能做到的是: 打開超連結, then copy what I want.
而我想更進一步,
希望可以不要透過"開啟PowerPoint(開啟超連結)"的動作, 就能擷取我想要的資訊
先略述我的程式碼如下
----------------------------------------------------
Sub CallName()
Dim ppApp As PowerPoint.Application
Dim ppPres As PowerPoint.Presentation
Dim ppSlide As PowerPoint.Slide
Dim ppShape As PowerPoint.Shape
Dim tr As TextRange
以儲存格中的文字建立超連結到該ppt檔案
開啟超連結
Set ppApp = New PowerPoint.Application
Set ppPres = ppApp.Presentations(1)
Set ppSlide = ppPres.Slides.Item(1)
For j = 1 To ppSlide.Shapes.Count
Set ppShape = ppSlide.Shapes.Item(j)
If 這個shape物件是我要的格式和內容 Then
Set tr = ppShape.TextFrame.TextRange
tr.Copy
貼到EXCEL檔案
End If
Next j
End Sub
-------------------------------------------------------
還請版上高手幫忙解惑
By the way, 不知道這邊能不能問VBA的問題
如果有違板規自D
(我去友版Visual_Basic發問過, 不過那裏頗冷清的.....>"<)
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 125.230.152.185
※ 文章網址: http://www.ptt.cc/bbs/Office/M.1403374052.A.676.html
→
06/22 10:58, , 1F
06/22 10:58, 1F
→
06/23 23:29, , 2F
06/23 23:29, 2F
→
06/23 23:30, , 3F
06/23 23:30, 3F
→
06/23 23:31, , 4F
06/23 23:31, 4F
→
06/23 23:31, , 5F
06/23 23:31, 5F
→
06/24 00:35, , 6F
06/24 00:35, 6F
→
06/24 00:35, , 7F
06/24 00:35, 7F
→
06/24 21:35, , 8F
06/24 21:35, 8F
→
06/24 21:35, , 9F
06/24 21:35, 9F
→
06/24 22:46, , 10F
06/24 22:46, 10F
Office 近期熱門文章
PTT數位生活區 即時熱門文章