Date: prev next · Thread: first prev next last
2024 Archives by date, by thread · List index


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+unsubscribe@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

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.