把PPT中的所有超级链接进行自动更换的关键代码,很有用的,只是许多人用不到这一块。
Sub fhfghfg()
slidcount = ActiveWindow.Presentation.Slides.Count
For sld = 1 To slidcount
On Error GoTo nonono1
linkcount = ActiveWindow.Presentation.Slides.Item
(sld).Hyperlinks.Count
For link = 1 To linkcount
On Error GoTo nonono
'MsgBox ActiveWindow.Presentation.Slides.Item
(sld).Hyperlinks.Item(link).Address
newlink ="http://www.crownboy.com/post/新课程高中英语/" & Mid(ActiveWindow.Presentation.Slides.Item
(sld).Hyperlinks.Item(link).Address, 1, Len
(ActiveWindow.Presentation.Slides.Item(sld).Hyperlinks.Item
(link).Address) - 4) & ".htm"
'MsgBox newlink
ActiveWindow.Presentation.Slides.Item(sld).Hyperlinks.Item
(link).Address=newlink
nonono:
Next
nonono1:
Next
End Sub
