Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-20-2015, 11:48 PM
macropod's Avatar
macropod macropod is offline Opening a word doc without opening all attached links/reference Windows 7 64bit Opening a word doc without opening all attached links/reference Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,514
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Unfortunately, Word doesn't provide a global setting, or even a 'Links' collection that one could use to programmatically change all the links. All that leaves you with is a macro to go through every field, shape and inlineshape in the document, looking for links to re-set. A macro you might use for that is:
Code:
Sub ToggleLinkUpdates()
Application.ScreenUpdating = False
Dim Rng As Range, Fld As Field, Shp As Shape, iShp As InlineShape, Rslt As Variant, bUpd As Boolean
Rslt = MsgBox("Set Link Updates to Auto (Y) or Manual (N)?", vbYesNoCancel, "Toggle Link Updates")
If Rslt = vbCancel Then Exit Sub: If Rslt = vbYes Then bUpd = True: If Rslt = vbNo Then bUpd = False
With ActiveDocument
  For Each Rng In .StoryRanges
    For Each Fld In Rng.Fields
      If Fld.Type = wdFieldLink Then Fld.LinkFormat.AutoUpdate = bUpd
    Next
    For Each Shp In Rng.ShapeRange
      If Not Shp.LinkFormat Is Nothing Then Shp.LinkFormat.AutoUpdate = bUpd
    Next
    For Each iShp In Rng.InlineShapes
      If Not iShp.LinkFormat Is Nothing Then iShp.LinkFormat.AutoUpdate = bUpd
    Next
  Next
End With
Application.ScreenUpdating = True
End Sub
You might also take a look at: https://support.microsoft.com/en-us/kb/970154 . Although written for Office 2007, the same applies to Office 2010. The Office 2010 Registry key, though, would be in -


HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\W ord\Options
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #2  
Old 07-21-2015, 08:49 AM
Nicobisgaard Nicobisgaard is offline Opening a word doc without opening all attached links/reference Windows 7 64bit Opening a word doc without opening all attached links/reference Office 2010 64bit
Novice
Opening a word doc without opening all attached links/reference
 
Join Date: Apr 2015
Posts: 8
Nicobisgaard is on a distinguished road
Default

The macro looks very cool, but unfortunantly i wasn't able to get it to work. It kept crashing my document.
I will try and test it later on another document with less links.
I was however able to solve most of the errors. The broken links can be fixed by this tool:
http://www.oaltd.co.uk/MVP/Default.htm
(FindLink) that helped me locate and delete the broken links.

The one error i still can't quite figure out is the
"... Reopening will cause any changes you made to be discarded ... "

I don't have any documents open when i open the Main Word documents with all the links attached. I do have multiple links to the same excel workbook so a possibility could be that it opens the excel workbook when it first comes across the link, when opening the main word document, and the next time, it gets confused. This does not seem realistic though, as the error comes about 5-10 times only when i open my word document, but i have 100-200 links to the same excel workbook.

Also just to be clear - I have changed all the links to manual now. But any new created links are set to Auto by default. Why is this? And can it be changed!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Template Always Opening Hobbes Word 7 09-24-2014 11:00 PM
Opening a word doc without opening all attached links/reference Need Help With Opening a Word Document PosseJohn Word VBA 1 12-06-2013 01:16 PM
Opening a word doc without opening all attached links/reference Word files not opening dogMarine Word 1 10-15-2012 11:32 AM
Opening Word XML files in IE8? RBizzle Word 0 09-13-2010 08:25 AM
Opening a word doc without opening all attached links/reference Opening word docs Bemklaver Word 1 03-31-2010 02:22 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:28 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft