Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-22-2017, 02:27 PM
Fabulist Fabulist is offline Can links move with the document? Windows 10 Can links move with the document? Office 2016
Advanced Beginner
Can links move with the document?
 
Join Date: Sep 2015
Posts: 33
Fabulist is on a distinguished road
Default Can links move with the document?

Hello everyone,

When I move various Excel files to different folders, user accounts, computers, etc. they work as long as their related and linked files (other Excel files) are in the same folder area. Can I have the same behavior with my Word file that is connected to other Excel files?

I am sorry but I do not know how to express this properly and look up something relevant to it. I currently change the full path on the Word file whenever it is moved to another folder.



The folders are Companies, which contain the Word files that are reports which are linked to the Excel files that are the company data (tables, words, charts, etc.). So it is a static condition between the files, but they need to be moved to different areas with different paths - if that makes any sense.

Thanks in advance!
Reply With Quote
  #2  
Old 03-22-2017, 03:19 PM
macropod's Avatar
macropod macropod is offline Can links move with the document? Windows 7 64bit Can links move with the document? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Word file links are always absolute. Moving the files to another computer is OK provided that computer has exactly the same folder path to the source files. Given the absolute nature of the links, though, that also means you can move the Word file about without breaking them.

To see how to implement relative paths in Word, check out the field coding and macro solutions I've posted in the Word Fields and Relative Paths to External Files 'Sticky' thread at the top of this forum: https://www.msofficeforums.com/word/...nal-files.html
Note: Since links to Excel files employ LINK fields, you'll need the macro solution.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-23-2017, 04:46 AM
Fabulist Fabulist is offline Can links move with the document? Windows 10 Can links move with the document? Office 2016
Advanced Beginner
Can links move with the document?
 
Join Date: Sep 2015
Posts: 33
Fabulist is on a distinguished road
Default

Hello macropod, and thank you for your constant assistance, I will study your post and reply back in case of complete failure.

Thank you again.
Reply With Quote
  #4  
Old 01-24-2018, 10:51 AM
Fabulist Fabulist is offline Can links move with the document? Windows 10 Can links move with the document? Office 2016
Advanced Beginner
Can links move with the document?
 
Join Date: Sep 2015
Posts: 33
Fabulist is on a distinguished road
Default

Hello again, it has been some time from this post.

The more I try to understand what I have to do to make your macro work the more wrong I am it seems. Is there maybe a step by step guide for super dummies so I can try to make your macro work?
Reply With Quote
  #5  
Old 01-24-2018, 11:58 AM
Charles Kenyon Charles Kenyon is offline Can links move with the document? Windows 10 Can links move with the document? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,175
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

'
Quote:
Originally Posted by Fabulist View Post
Hello again, it has been some time from this post.

The more I try to understand what I have to do to make your macro work the more wrong I am it seems. Is there maybe a step by step guide for super dummies so I can try to make your macro work?
I think that is the Dummies edition! This is not for the faint-at-heart. Did you download the file at the end?
Reply With Quote
  #6  
Old 01-24-2018, 02:12 PM
macropod's Avatar
macropod macropod is offline Can links move with the document? Windows 7 64bit Can links move with the document? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Fabulist View Post
The more I try to understand what I have to do to make your macro work the more wrong I am it seems. Is there maybe a step by step guide for super dummies so I can try to make your macro work?
The macro attached to the post there is in a ready-to-run state, all you need do is unzip it then import it into the Word document, for which you
• press Alt-F11 to open the VBE
• click on your document's entry in the panel on the left
• choose File|Import File
• navigate to and select the unzipped file
• press OK
• save the document.
Done. That's essentially the same as what the instructions in the link tell you to do. There really is nothing to simplify.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 01-24-2018, 02:23 PM
Fabulist Fabulist is offline Can links move with the document? Windows 10 Can links move with the document? Office 2016
Advanced Beginner
Can links move with the document?
 
Join Date: Sep 2015
Posts: 33
Fabulist is on a distinguished road
Default

Thank you for getting back at this!

Excuse me I did not clarify, I did import your macro and run it, but nothing is happening; the macro runs and nothing changes on any linked item.

The files are like this:

Word file in:

C:\Users\Admin\Documents\Workstation\Audit Modules\Company A\END DATA\Report.docm

The Excel files linked on the Word file above are in:

C:\Users\Admin\Documents\Workstation\Audit Modules\Company A\Report.xlsm

--- The Report.docm needs to be moved below ---

C:\Users\Admin\Documents\Workstation\Audit Modules\Company B\END DATA\Report.docm

The Excel files linked on the Word file are in (same as before):

C:\Users\Admin\Documents\Workstation\Audit Modules\Company B\Report.xlsm

So it is a straightforward switch from Company A to Company B, but I guess I am supposed to change something because it is not doing anything as is.
Reply With Quote
  #8  
Old 01-24-2018, 02:37 PM
macropod's Avatar
macropod macropod is offline Can links move with the document? Windows 7 64bit Can links move with the document? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Did you actually move the document to the new location?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 01-24-2018, 11:07 PM
Fabulist Fabulist is offline Can links move with the document? Windows 10 Can links move with the document? Office 2016
Advanced Beginner
Can links move with the document?
 
Join Date: Sep 2015
Posts: 33
Fabulist is on a distinguished road
Default

Yes, I did go through multiple tryouts and I am receiving a "Sub or Function not defined" error most of the times, but nothing happens regardless.
Reply With Quote
  #10  
Old 01-25-2018, 07:14 AM
Charles Kenyon Charles Kenyon is offline Can links move with the document? Windows 10 Can links move with the document? Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,175
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

In this context, getting an error message is not "nothing happens."
Reply With Quote
  #11  
Old 01-25-2018, 07:23 AM
Fabulist Fabulist is offline Can links move with the document? Windows 10 Can links move with the document? Office 2016
Advanced Beginner
Can links move with the document?
 
Join Date: Sep 2015
Posts: 33
Fabulist is on a distinguished road
Default

Sorry I did not clarify, the error is not something that appears all the time (and did not appear to me up until #9), and regardless of whether it appears or not; "nothing happens" in terms of something happening in the context of the macro functioning.
Reply With Quote
  #12  
Old 01-25-2018, 01:31 PM
macropod's Avatar
macropod macropod is offline Can links move with the document? Windows 7 64bit Can links move with the document? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by Fabulist View Post
Yes, I did go through multiple tryouts and I am receiving a "Sub or Function not defined" error most of the times, but nothing happens regardless.
That suggests you've not installed the macro the way it is intended to be installed. Perhaps you could attach a copy of the document, with the code as imported, to a post (you can delete the content) You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #13  
Old 01-25-2018, 11:33 PM
Fabulist Fabulist is offline Can links move with the document? Windows 10 Can links move with the document? Office 2016
Advanced Beginner
Can links move with the document?
 
Join Date: Sep 2015
Posts: 33
Fabulist is on a distinguished road
Default

I imported the macro as you described again and I got the same result, a "Module1" with your macro in it.

I linked an item the original file has on a new document and I received this:

"Run-time error '6083':

Objects in this document contain links to files that cannot be found. The linked information will not be updated."

And the following line is highlighted on debug: .SourceFullName = Replace(.SourceFullName, OldPath, NewPath)

The linked object can be updated properly and works as expected.
Attached Files
File Type: docm test.docm (26.2 KB, 9 views)
Reply With Quote
  #14  
Old 01-26-2018, 04:06 AM
macropod's Avatar
macropod macropod is offline Can links move with the document? Windows 7 64bit Can links move with the document? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Your document's LINK field is corrupt.

It contains:
{ LINK Excel.SheetMacroEnabled.12 "C:\\Users\\GMF\\Documents\\Workstation\\Audit Modules\\ΠΡΟΓΡΑΜΜΑ ΕΚΘΕΣΗΣ\\IPPOKRATIS\\ΔΕΔΟΜΕΝΑ ΕΚΘΕΣΗΣ.xlsm!ΣΥΝΟΠΤΙΚΑ!R253C2:R255C12" "" \p }

It should contain:
{ LINK Excel.SheetMacroEnabled.12 "C:\\Users\\GMF\\Documents\\Workstation\\Audit Modules\\ΠΡΟΓΡΑΜΜΑ ΕΚΘΕΣΗΣ\\IPPOKRATIS\\ΔΕΔΟΜΕΝΑ ΕΚΘΕΣΗΣ.xlsm" "ΣΥΝΟΠΤΙΚΑ!R253C2:R255C12" \p }

In any event, the file named ΔΕΔΟΜΕΝΑ ΕΚΘΕΣΗΣ.xlsm must be located in the same folder as the document for the update to work.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #15  
Old 01-26-2018, 05:23 AM
Fabulist Fabulist is offline Can links move with the document? Windows 10 Can links move with the document? Office 2016
Advanced Beginner
Can links move with the document?
 
Join Date: Sep 2015
Posts: 33
Fabulist is on a distinguished road
Default

I am not sure why there is an error in the test document in the first place, but I was running the macro while having the documents on 1 folder up from the source files, I did not understand that having the documents in a different folder could be a problem. So I created a new test file and it works properly.

However, I run multiple tests on the original file which has multiple connections (by having it as well on the same folder) and for some reason the macro does not work. Also, there are no errors produced this time (so far).

I am not sure how to debug it, any ideas are welcome, but unfortunately I cannot edit the file to the point where I can upload it on the web.

I will keep trying and if somehow I figure out the problem I will let you know.
Reply With Quote
Reply

Tags
keep links, move files



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can links move with the document? embedded links in protected document John147 Word 1 08-10-2014 04:18 AM
Tiny picture/document links phillip2810 PowerPoint 0 02-21-2014 02:22 PM
Embedded Links failing in word document jim_jim Word 0 02-05-2013 07:48 AM
Can links move with the document? TOC links to images in document? Splint Word 3 11-06-2011 05:50 AM
Can links move with the document? Hypertext links within document? (not to a website) cosiyak Word 1 05-22-2011 01:26 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:38 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft