Robert

Thank you. I should have clarified: the image that comes up on the form is a size limited version of the actual file on the hard disk. I called it a "thumbnail" as shorthand for that level of detail; Sorry.

So, seeing how I am an ingénue in the macro game, can I confirm the process?

1. Add as an embedded macro the following:
   SUB ShowLinkedContent(oEvent AS OBJECT)
        oDoc = ThisComponent
        DIM oButton AS OBJECT, oForm AS OBJECT, oField AS OBJECT,
   oShell AS OBJECT
        DIM stField AS STRING, stUrl AS STRING, stContent AS STRING
        DIM arUrl_Start()
        oButton = oEvent.Source.Model
        stField = oButton.Tag
        oForm = oButton.Parent
        oField = oForm.getByName(stField)
        stUrl = oField.BoundField.getString
        arUrl_Start = split(oDoc.Parent.Url,oDoc.Parent.Title)
        oShell = createUnoService("com.sun.star.system.SystemShellExecute")
        stContent = convertToUrl(arUrl_Start(0) + stUrl)
        oShell.execute(stContent,,0)
   END SUB

2. In each image button, under the additional information field, write
   the name of the image control.

Is that right?


On 25/03/2024 6:01 pm, Robert Großkopf wrote:
Hi Edwin,

How should an external viewer open another picture, which isn't linked in the form? A macro will open the thumbnails.

Link the original fotos to the form. Then take this procedure:

SUB ShowLinkedContent(oEvent AS OBJECT)
    DIM oButton AS OBJECT, oForm AS OBJECT, oField AS OBJECT, oShell AS OBJECT
    DIM stField AS STRING, stUrl AS STRING, stContent AS STRING
    DIM arUrl_Start()
    oButton = oEvent.Source.Model
    stField = oButton.Tag
    oForm = oButton.Parent
    oField = oForm.getByName(stField)
    stUrl = oField.BoundField.getString
    arUrl_Start = split(oDoc.Parent.Url,oDoc.Parent.Title)
    oShell = createUnoService("com.sun.star.system.SystemShellExecute")
    stContent = convertToUrl(arUrl_Start(0) + stUrl)
    oShell.execute(stContent,,0)
END SUB

Write the name of the image control to the additional information of the button, which should start this procedure.

Regards

Robert
--

Regards,
Edwin Humphries
Mobile: 0435 672 457

I acknowledge the traditional Wodi Wodi custodians, their elders and customs, of the Dharawal lands on which I live.

"At every moment he beholdeth a wondrous world, a new creation, and goeth from astonishment to astonishment, and is lost in awe at the works of the Lord of Oneness." Bahá'u'lláh "... humans are interesting. With all the wonders there are in the Universe, they invented boredom." Terry Pratchett, Hogfather "The most beautiful thing we can experience is the mysterious. It is the source of all true art and all science. He to whom this emotion is a stranger, who can no longer pause to wonder and stand rapt in awe, is as good as dead: his eyes are closed." Albert Einstein "Stuff your eyes with wonder ... live as if you'd drop dead in ten seconds. See the world. It's more fantastic than any dream made or paid for in factories." Ray Bradbury
--
To unsubscribe e-mail to: users+unsubscr...@global.libreoffice.org
Problems? https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/
Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/users/
Privacy Policy: https://www.documentfoundation.org/privacy

Reply via email to