|
I use PowerPoint a great deal, and often want to include URLs as part of a presentation. PowerPoint 2000, however, always wants to convert anything that looks like a URL into a hyperlink in the slide. It uses the standard colors associated with hyperlinks, which may conflict with my design scheme. And, to be honest, I have seldom needed a live hyperlink from a PowerPoint slide.
If there's an option to have PowerPoint 2000 not do this, I've not been able to find it. In each case, I've selected the offending hyperlink and used the context menu and its Hyperlink option to remove the hyperlink. This is awfully tedious for a page with several links on it.
The last time I came across this, I'd had enough. I wrote the following code fragment to remove all the links on the current page:
Public Sub ClearHyperlinks()
' Remove all hyperlinks from the current slide.
dim hyp As Hyperlink
With ActiveWindow.Selection.SlideRange
For Each hyp In .Hyperlinks
hyp.Delete
Next hyp
End With
End Sub
Given the code, it occurred to me that I might want to remove all links in the entire document. That modification was simple, and ended up looking like this:
Public Sub ClearAllHyperlinks()
' Remove all hyperlinks from all slides.
dim sld As Slide
dim hyp As Hyperlink
For Each sld In ActivePresentation.Slides
For Each hyp In sld.Hyperlinks
hyp.Delete
Next hyp
Next sld
End Sub
That did the trick! Although the only way I can see to make this available to all presentations is to wrap it up in a COM Add-in for PowerPoint, that's easy enough to do if you're determined. Hopefully, these fragments will give you enough to get you started.
-- Ken Getz
|