Solved

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

Posted on 2009-04-03
4
1,168 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 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

This article describes how to use the Send to Mail Recipient command. The instructions apply generally to Office 2007 and later versions, but Microsoft® Word 2013 was used for the specific steps and figures.  What is Send to Mail Recipient? Send…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.

739 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