Group:  Microsoft Word ยป microsoft.public.word.vba.general
Thread: Delete web scripts pasted from web pages

Delete web scripts pasted from web pages
Paul Martin <melbournefilm[ at ]gmail.com> 1/1/2009 5:33:51 AM
I regularly paste web pages into Word which I then format. With non-
printable characters displaying on the screen, any web scripts show up
at yellow boxes, and I'd like to delete these. The following code
causes a crash in Word (forced restart of Word) on the line "If Not
ishp.Script Is Nothing Then". Any suggestions appreciated.

Paul Martin
Melbourne, Australia


Dim ishp as InlineShape

For Each ishp In ActiveDocument.InlineShapes
If Not ishp.Script Is Nothing Then
ishp.Delete
End If
Next ishp

Home | Search | Terms | Imprint
Newsgroups Reader