Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2009-04-03
4
Medium Priority
?
1,185 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 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

886 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