I have found Villeroy's toturial about ExternalLinks in Calc here: http://user.services.openoffice.org/en/ ... =75&t=3294
and his macro to update Links here: http://user.services.openoffice.org/en/ ... =20&t=6004
I have a Spreadsheet with many Links to other spreadsheets and I want to write a macro that allows the user to update all the links with the help of a button without going to "Edit>Link...>", marking all links and then clicking "update".
I tried Villeroy's macro:
Code: Select all
Sub refreshAllSheetLinks()
oEnum = thisComponent.AreaLinks.createEnumeration
while oEnum.hasMoreElements
oLink = oEnum.NextElement
oLink.refresh
wend
oEnum = thisComponent.SheetLinks.createEnumeration
while oEnum.hasMoreElements
oLink = oEnum.NextElement
oLink.refresh
wend
oEnum = thisComponent.DDELinks.createEnumeration
while oEnum.hasMoreElements
oLink = oEnum.NextElement
oLink.refresh
wend
End Sub
Then I changed the macro to:
Code: Select all
Sub refreshAllSheetLinks()
oEnum = thisComponent.ExtrenalDocLinks.createEnumeration
while oEnum.hasMoreElements
oLink = oEnum.NextElement
oLink.refresh
wend
End Sub
Because I didn't find any refresh/update method I tried to look in the dbg_methods property, but there I didn't find an update/refresh method.
Could someone pls tell which is the correct method to update the externaldoclinks - I searched the internet for hours but only found Villeroy's macro in several posts.
Thanks very much for your help.