Solved

Broken Dynamic Links Between Excel and Word(Object Not Found)

Posted on 2009-04-03
4
1,148 Views
Last Modified: 2012-05-06
I am using Office 2007, and I have a word file that has several dynamic excel links embedded in the document.  Both the excel and word files are stored on a local server.  The Word doc has lost the reference to the excel data, and will no longer reflect the changes made inside of the Excel Sheet.  When I right-click on any of the linked Excel info and click "Object", it says that the object is corrupt or no longer available.  When I try to edit the links to the files, I am able to do so, but it loses any prior worksheet/specific cell info attached to the link.  To help explain my problem, I'm attaching a picture of my link info.  What I am looking for is any one of these three things:

1.  I need a way to view the absolute path of where Word is trying to locate the file(This is underlined in RED in the picture)
2.  I need a way to redirect the link to the excel file, but still keep the specific worksheet/cell info contained in the original link. (The worksheet/cell info that I'm talking about is underlined in BLUE in the picture) Currently, when I update the link, this reference info is lost.
3.  I need some alternate way of re-linking my excel sheet to my word doc.  

I have read a little about this issue, and a few posts have suggested that Norton may be the cause of the broken links.  I have never had Norton installed, but I do use Trend Micro.  Is there a way to recover my dynamic links?  Any help on this will be greatly appreciated.  Thanks for reading.

*Edit*
I forgot to mention this:

If I try to open the Word file that's stored on the server,(The original, working file) It throws out an error(encountered a problem and needs to close).  The only way I was able to get into the doc in the first place was to save a copy of the file to my harddrive.  I thought I might should include that bit of info.  
excellinks.JPG
0
Comment
Question by:thedeal56
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
StellanRosengren earned 400 total points
ID: 24102410
Hi thedeal56,
I do not have a lot of experience with Word, but I will try to provide a starting point for the solution.
Attached is a code sample that I tried in Word 2003. Hopefully it will work in Word 2007 also.
It will loop through all fields in the active document and if there is a LinkFormat object it will get the field's result (a range object) and the LinkFormat object's SourcePath and SourceName and enter them in the Immediate window.
Please tell me if you need advice on how to run this. If this code produce something that looks useful it might be a good starting point for a solution.

Kind regards,
Stellan
Sub tst2()

    Dim wdApp As Word.Application

    Dim docU As Word.Document

    Dim fld As Word.Field

    Dim rn As Word.Range

    

    

    Set docU = ActiveDocument

    

    For Each fld In docU.Fields

        If Not fld.LinkFormat Is Nothing Then

            Set rn = fld.Result

            Debug.Print rn.Text, fld.LinkFormat.SourcePath, fld.LinkFormat.SourceName

        End If

    Next fld

    

End Sub

Open in new window

0
 

Author Comment

by:thedeal56
ID: 24106731
Thanks for the reply.  I tried to run your code in the vb editor, but I didn't get any results.  I think I do need some instruction on how to run it.  
0
 
LVL 19

Assisted Solution

by:dlc110161
dlc110161 earned 100 total points
ID: 24111793
Are you trying to run the code inside of Word? If you are, then these instructions will be very helpful to you. http://word.mvps.org/FAQs/MacrosVBA/CreateAMacro.htm

Dawn Bleuel
Word MVP
0
 
LVL 13

Assisted Solution

by:StellanRosengren
StellanRosengren earned 400 total points
ID: 24112622
Hi thedeal56,
Copy the code to a document in a trusted location (Office Button->Word options->Trust Center->Trust Center Settings...). Press Alt-F11 to open VBE. The press Ctrl-G to open the immediate window where the link path and filename should be written. You should open the doc with the broken links before you run the macro since it gets the link info from the active document.

Please tell me if you need more advice.

Kind regards,
Stellan
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

The Selection object is designed for user interaction. It has a Range property, so it can be used in most places that a Range object can. Recorded macros must use the Selection because they are simply copying what the user is doing. A Range prope…
Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
In a previous video Micro Tutorial here at Experts Exchange (http://www.experts-exchange.com/videos/1358/How-to-get-a-free-trial-of-Office-365-with-the-Office-2016-desktop-applications.html), I explained how to get a free, one-month trial of Office …

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now