#1
|
|||
|
|||
Opening a word doc without opening all attached links/reference
Basically i have a very large Word document with a ton of referenced links to a variety of different excel workbooks.
When i want to open my word document i would like it to just open it and not worry about all the attached links every time i open the word document. The reason being that it produces a number of different errors because there are some of the linked excel sheets that have broken links and a few other errors as shown below. Right now it takes me between 5 and 10 minutes to open my word document and its a bit frustrating to have to manually click on all these error messages. The error of "This workbook contains one or more links that cannot be updated", is there because i have links to excel workbooks with broken links in them. These broken links are links that are basically impossible to find as they are huge excel workbooks used in my company that would take forever to search and find. The error of "... Is already open": Not sure why this pops up. The excel sheet is not open when i first try and open my word document. The "... caused a serious error" is unclear aswell. When i manually open the excel workbook i don't get any erriors. So basically i want word to just ignore every error it can think of, and just open the document i want, as fast as possible. Currently tried and attempted: Pressing options, edit links to file, set update method to Manual. (Problem being that you have to do this manually for every link, which is both very time consuming and not 100% optimal as there might be new links) Options -> Advanced -> Uncheck "Update automatic links at open" Any suggestions as to what i can do to prevent/supress the error messages is greatly appreciated. |
#2
|
||||
|
||||
The simple solution is to fix the broken links in your source workbook(s). Excel workbook links aren't all that hard to find. See:
https://support.office.com/en-sg/art...7-ff90ae5a2cc4
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
I m not sure how it helps finding the links. I've already tried fixing the excel workbooks through help on another forum without luck. Reason being that some of the workbooks have a very large number of cells, sheets, macros, data validation lists, etc.
Simply breaking the links does work on some of the linked files, but on all, due to some of the workbooks being password protected i guess. Also i can see how it would prevent me from having to reply to all the error messages but it still does not help the fact that i would like to not have to have Word open all the 50 linked excel files every time i want to open the word document as the process takes a very long time. |
#4
|
||||
|
||||
You can't have Word update its links to the workbooks without it opening them; that's just how things work and those workbooks, in turn, will want to update their links. As far as I can tell, your problems can all be traced back to the broken links.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
Not even if i don't want Word to update the links? All i basically want is word to open the document i mentioned earlier and not update any of the links in the document. Then if i want to update the links, i will manually do it.
|
#6
|
||||
|
||||
In that case, you can use File>Info>Edit Links to Files (lower right corner of the screen), to change the links to manual update.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#7
|
|||
|
|||
You can get those [not being able to update] messages even though there are no broken links... searched a workbook many times, but there's none [not even in named ranges that contain a dynamic formula].
Of course, linking to files with the same name is asking for trouble, and the last warning screenshot confirms so. Would you ever open that archived copy, it will substitute links to point to itself. One pit-fall is using certain methods of index/match with offsets to fetch data from an external book. You could end up with #N/A evaluations, subsequently followed with warning of errors. EDIT: An example what does work, where the name\location of the file can be changed by making indirect look at a secondary field to get the file name [in text form]. Sample =INDIRECT("'[WhateverFileName.xlsm]SheetName'!RangeCellName") |
#8
|
|||
|
|||
The last error message was defintely a mistake. I wanted to leave it out as it's simply fixable. I m working on two cases simultaniously so sometimes i forget to close files in one of the two cases.
The remaining error messages are still hard to get rid of though. As i said initially, the problem about the File>Info>Edit Links to Files method is that i have to do it manually for every single link. And Word won't allow me to just mark everything and change it. It only alllows a limited number at a time. That's why i was looking to see if there was a smarter way of handling it. |
#9
|
||||
|
||||
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 HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\W ord\Options
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
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! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Word Template Always Opening | Hobbes | Word | 7 | 09-24-2014 11:00 PM |
Need Help With Opening a Word Document | PosseJohn | Word VBA | 1 | 12-06-2013 01:16 PM |
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 word docs | Bemklaver | Word | 1 | 03-31-2010 02:22 AM |