Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-04-03
4
Medium Priority
?
1,179 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 13

Accepted Solution

by:
StellanRosengren earned 1600 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 400 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 1600 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

730 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