Breaking links with VBA

J

Jonesy Boy

I have a Word document that has links to an Excel spreadsheet.
I want to break the Excel links using VBA. I have tried most suggestions
posted on the web but nothing suits and I am struggling!
Can anyone suggest some code to achieve this?

Thanks
Martyn
 
C

Cindy M -WordMVP-

Hi =?Utf-8?B?Sm9uZXN5IEJveQ==?=,
I have a Word document that has links to an Excel spreadsheet.
I want to break the Excel links using VBA. I have tried most suggestions
posted on the web but nothing suits and I am struggling!
Can anyone suggest some code to achieve this?
It would help us a lot if you'd post URLs to the methods you've tried, or
if you'd list them. You also need to tell us
- the version of Word involved
- whether the Excel objects in question are formatted in-line with the
text, or with text flow formatting

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 
D

Doug Robbins - Word MVP

Dim af As Field
With ActiveDocument
For Each af In .Fields
If af.Type = wdFieldLink Then
af.Unlink
End If
Next af
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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