Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / May 2006

Tip: Looking for answers? Try searching our database.

Breaking links with VBA

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jonesy Boy - 15 May 2006 12:39 GMT
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
Cindy M  -WordMVP- - 15 May 2006 17:03 GMT
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 :-)
Doug Robbins - Word MVP - 15 May 2006 18:24 GMT
Dim af As Field
With ActiveDocument
   For Each af In .Fields
       If af.Type = wdFieldLink Then
           af.Unlink
       End If
   Next af
End With

Signature

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

>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
[quoted text clipped - 3 lines]
> Thanks
> Martyn
Jonesy Boy - 17 May 2006 17:21 GMT
Cheers Doug - pure genious!

Works a dream, thank you very much.

Jonesy

> Dim af As Field
> With ActiveDocument
[quoted text clipped - 12 lines]
> > Thanks
> > Martyn
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.