Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Other Office > Word VBA
|
Word VBA Discuss using VBA to program Word.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Word VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 9th, 2009, 05:06 AM
Registered User
 
Join Date: Apr 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Update all fields and then break all links

Hi,

I have a kind of 'master document' in Word, which contains links to a large number of smaller word documents. From time to time I need to get a 'snapshot' of this document. Therefore I want to update all links, and after the update I want to break the links.

This can be done manually, via the 'edit' --> 'links' menu, but I would like to have this done via a macro. Does anyone know how to achieve this?

To perform the update of all fields I could use this:
Code:
    Selection.WholeStory
    Selection.Fields.Update
but I don't know how to break all links

Thanks for your help!
 
Old July 20th, 2009, 09:58 AM
Registered User
 
Join Date: Jul 2009
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Selection.Range.Hyperlinks(1).Delete
 
Old July 20th, 2009, 10:12 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Quote:
Originally Posted by sverhaeghe View Post
Hi,

I have a kind of 'master document' in Word, which contains links to a large number of smaller word documents. From time to time I need to get a 'snapshot' of this document. Therefore I want to update all links, and after the update I want to break the links.

This can be done manually, via the 'edit' --> 'links' menu, but I would like to have this done via a macro. Does anyone know how to achieve this?

To perform the update of all fields I could use this:
Code:
    Selection.WholeStory
    Selection.Fields.Update
but I don't know how to break all links

Thanks for your help!
Can you try:

Code:
Selection.Fields.Unlink
Cheers
Shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)





Similar Threads
Thread Thread Starter Forum Replies Last Post
How are the Update/Cancel links wired? BKahuna BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 5 October 7th, 2007 12:58 PM
Report fields have links skdevre Crystal Reports 1 May 7th, 2007 08:46 AM
Update links in excel file Wall st Guru Excel VBA 2 December 11th, 2006 05:09 AM
update a fields value Vince_421 Access VBA 2 May 19th, 2006 06:41 AM
links in table fields (td) amc Dreamweaver (all versions) 0 August 30th, 2004 09:20 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.