@jimk: Wasted again some time (with 7.1 Dev alpha0 now). No crash, but trying to load with “_self” is ignored, and trying to use the current frame the way you described, the nextDoc is loaded, but into a new frame with empty name…
Same effect with V6.2.5 portable
Exact code:
Sub changeFrameContentFromFileHyperlink()
link = ThisComponent.CurrentSelection(0).HyperlinkURL
REM The link is actually a valid file link, and it works.
REM However, I never get the file into the correct target frame.
REM The result is always as if I used "_blank".
myFrameName = "myTestFrame"
ThisComponent.CurrentController.Frame.Name = myFrameName
Print ThisComponent.CurrentController.Frame.Name
nextDoc = StarDesktop.loadComponentFromUrl(link, myFrameName, 2, Array()) ', myFrameName
Print nextDoc.CurrentController.Frame.Name
End Sub