I have a dream related to ImageURL

Is it possible to get the URL of an image file that’s placed on a spreadsheet using macro and use it as the ImageURL for an Image control on a Dialog box?

This does not work :confused:

Let me guess, which problem you try to solve with all that macro code.
https://www.mediafire.com/file/b4p5155c1y8bhoq/Headshots.zip/file (without macro code)

1 Like

Try:
image-from-sheet-to-dialogImage.ods (29.8 kB)

In the conditions of the previous example, it can be shorter: :slight_smile:

oImg.Model.Graphic=ThisComponent.Sheets(0).DrawPage(0).Graphic
1 Like

@KamilLanda

Thank you very much. You fulfilled my dreams and brightened my day :heart_eyes:
EDIT: Your tip works brilliant, but nothing else seem to work in my tuning :roll_eyes:

@sokol92

Thanks to you too. What if multiple images have been added to the same spreadsheet?

You can determine the graphic object that interests you in a cycle through the elements of the Drawpage object of the sheet.
For example, you can analyze the Anchor property, or use Name.

Thx for this.