avoid to be asked for update "external" links [solved]
I have actually, in a odt file, internal DDE links (from one part to another one of the same file), but when I open that file I am always asked for "update external links", because that links are seen (in edit -> links) as external (with the complete path of that file).
How can avoid this annoying behaviour?
- Useless "cut" the path of the file (in Edit -> Links), leaving only the file name: doesn't works, the link is not recognized anymore.
- Useless also Tools -> Options -> LibreWriter -> General > Update lins when loading: always
Thank you!
EDIT
I've found this, but it doesn't work in Writer, even so modified
Sub autoupdate_DDE
' 20170314
' load library with help function
GlobalScope.BasicLibraries.LoadLibrary( "Tools" )
' get all DDE links of document '
dde_links = ThisComponent.textfields
' get array of names '
aEN = dde_links.getElementNames()
' work on every DDE link '
for i = 0 to UBound( aEN() )
xTF = dde_links.getByName( aEN( i ) )
xTF.refresh()
Next
End Sub
EDIT
As I said I use DDE link (copy a sentence, f.e., and paste special -> as DDE link in another part of the same file) to avoid duplicate in the same file and to duplicate (possible) modifications of the same item.
Please edit your question (don't use an answer) to explain how you created your links (which menu, which dialog option) as there is no DDE link in LO parlance. Describe your intent (quick navigation to the location of the link or cross-reference). Don't forget to mention your OS.
My subjective feeling: you may have alternate, more robust ways, of doing this, but I need to know your purpose.
From experiment, the solution would be to bookmark the phrase or paragraph then insert a cross-reference to it. However, the cross-reference can contain only a paragraph worth of data. If your duplicated text extends on several paragraphs, you must cross-reference each paragraph separately.
With cross-references, you have no dialog asking to refresh the links. You are free to refresh them any time you like with
Tools
>Update
>Update All
.If that answers your problem, I'll transform my comment into an answer and give more details.
With a cross-reference it seems that I cannot I see the sentence (which is in another part of the file). In other words, it is more similar to a hardlink (no good) than to a symlink (good). So this won't be the solution I'm looking for.
But I'm afraid that this is a LibreOffice bug...
What do you mean "I can't see the sentence"? You access the bookmarks through
Insert
>Cross-reference
and you get the text choosing Reference instead of the usual Page or Chapter.If you mean you can't check bookmark content while inserting, yes, this is a shortcoming, while it is possible for headings or numbered paragraphs.
Ok, it seems work quite well, thank you. Just only a problem, so far: format (no bold, no italic), but this was a problem also with dde links. Just some other experiments, afterwards I will mark as solved and your answer as the right one. EDIT Yes, you can transform your comment into an answer: it solved my problem! Thank you!