Removing hyperlinks en masse

J

Jeremy Fieldsend

Is there a way I can remove all hyperlinks in a document at once -
rather than go to each one, command-k and hit 'remove link'? I spent
ages unsuccessfully recording a macro. Is there a simpler way?

Many thanks
 
M

Michel Bintener

There is, through AppleScript. Open Script Editor, then copy/paste the
following text:

tell application "Microsoft Word"
delete every hyperlink object of active document
end tell

Run it, and it will remove all the hyperlinks in the active Word document.
I'm not sure how advanced Word v.X's AppleScript abilities are (if it can
deal with it at all, that is), so you might need to have Word 2004 for this.
Remember, whenever you post: always include the OS version and the version
of Office you're using.

By the way, the above script isn't mine, it was posted by Matt Neuburg a
couple of months ago, and I have used it many times ever since. Thanks for
that, Matt!

Michel
 
P

Paul Berkowitz

There is, through AppleScript. Open Script Editor, then copy/paste the
following text:

tell application "Microsoft Word"
delete every hyperlink object of active document
end tell

Run it, and it will remove all the hyperlinks in the active Word document.
I'm not sure how advanced Word v.X's AppleScript abilities are (if it can
deal with it at all, that is), so you might need to have Word 2004 for this.

Word X has no such AppleScript. There you'd have to do it via a VBA macro
(or, if you are a masochist, a VBA macro converted to a 'do Visual Basic'
AppleScript).

Remember, whenever you post: always include the OS version and the version
of Office you're using.

Right. It makes all the difference in the world in this case.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
J

Jeremy Fieldsend

Michel Bintener said:
There is, through AppleScript. Open Script Editor, then copy/paste the
following text:

tell application "Microsoft Word"
delete every hyperlink object of active document
end tell

Many thanks. I'll give it a whirl.
Run it, and it will remove all the hyperlinks in the active Word document.
I'm not sure how advanced Word v.X's AppleScript abilities are (if it can
deal with it at all, that is), so you might need to have Word 2004 for this.
Remember, whenever you post: always include the OS version and the version
of Office you're using.

Good point (and I usually do) I am using Word 2004 v11.2 in OS 10.4.5.

[snip]

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top