#16
|
|||
|
|||
macropod : I observed that the macro does not update automatically LINK when they are in Text Box. Is there a way to do so ?
(edit : Sorry, this is not the macro but Word itself which is not able to update the field in text box. Forget my question.) Thanks |
#17
|
||||
|
||||
Try replacing your textboxes with single-cell tables. You can make those float on the page like textboxes but, because they remain part of the document layer, fields in them should update more readily.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#18
|
|||
|
|||
Interesting ! Thanks
|
#19
|
|||
|
|||
Me again.
I'm working with Office 2010. When trying to applying your macro I get this error : Quote:
Displaying the debugger highlight the following line : Code:
.SourceFullName = Replace(.SourceFullName, OldPath, NewPath) I don't know whether it is important or not. I work with .xlsm and .docm files. |
#20
|
||||
|
||||
That suggests you still have links with the 'automatic update' property applied (aka the \a switch). Check each link under File>Edit Links to Files.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#21
|
|||
|
|||
Well, I did remove all \a updates but I still get the same error !
Another clue ? Thanks again |
#22
|
||||
|
||||
But did you check each link under File>Edit Links to Files?
You might also try the registry patch at: https://support.microsoft.com/en-us/kb/970154 For Office 2010 the key is at HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\W ord\Options
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#23
|
|||
|
|||
I may try this. The problem is that I want to run this macro to deploy this on many computers I don't have control on.
So what if it works on mine but does not on others ? I'd prefer a generic and simple option. I was also wandering if there was an other way to change links paths into a docx document like with executing a batch command line. Do you have any idea ? I may also mention that the XLSX file is 40MB big. I don't know if it can explain the issue. |
#24
|
||||
|
||||
That's what the macro does.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#25
|
|||
|
|||
Hi macropod,
Some news regarding my problem. It seems that cutting-pasting the folder (containing bot WOrd and Excel files) is ok. But copy-paste is triggering an error. Looking at your code (I'm not a VBA guy as you already guessed ;-) ....) I wonder if modifying that part could help. Code:
' Set the new path. ' If your files are always in a folder whose path bracnhes off, one or more levels above the current ' folder, replace the second '0' on the next line with the number of levels above the current folder. For i = 0 To UBound(Split(ActiveDocument.Path, "\")) - 0 Parent = Parent & Split(ActiveDocument.Path, "\")(i) & "\" Next i ' If your files are in a Child folder below the (new) parent folder, add the Child folder's ' path from the parent (minus the leading & trailing "\" path separators) on the next line. Child = "" NewPath = Parent & Child Could you give me a concrete example ? thanks |
#26
|
||||
|
||||
If both files are always in the same folder, there is no need to modify anything in that macro.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#27
|
|||
|
|||
Thanks for the quick answer
Could you confirm the bug when trying to copy-paste (in place of moving files) ? |
#28
|
||||
|
||||
I know of no such bug.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Links need to be Hot links in Bibliography in Word 2010, 2013 | synses | Word | 1 | 11-23-2013 12:48 AM |
Linking an Excel object into Word | cncolom | Word | 1 | 03-29-2013 03:01 PM |
Problem: object library invalid or contains references to object definitions | aligahk06 | Office | 0 | 08-19-2010 12:29 PM |
How to insert a project into Word as an object? | xxsawer | Project | 0 | 04-11-2010 04:21 PM |
Could not load this object as this object is not present in your computer | k.gaurav | Office | 0 | 08-17-2009 09:57 PM |