Files
LibreOffice-macro-for-image…/README.txt
2026-06-15 21:57:37 +02:00

71 lines
2.5 KiB
Plaintext

LIBREOFFICE IMAGE MACRO
Vklada obrazky do buniek LibreOffice Calc.
POUZITIE
1. Otvorte "znova.ods", pri vyzve povolte makra.
2. Na harku "Vyber" vyplnte stlpec "H" cestou k obrazku a stlpec "I"
odkazmi na cielove bunky (napr. "Vysledok.B5"), volitelny stlpec
"J" udava vysku v pixeloch pri zachovani pomeru stran.
3. Spustite makro: Stlacte tlacidlo.
Opatovne spustenie vymaze vsetky predtym vlozene obrazky a prekresli
ich.
PRIDANIE TLACIDLA NA SPUSTENIE MAKRA
Tlacidlo mozete pridat priamo na harok/stranku a spustat makro jednym
kliknutim. Funguje v Calc, Writer aj Draw.
1. Otvorte dokument.
2. Prejdite na: Zobrazit -> Panely nastrojov -> Ovladacie prvky
formulara.
3. Na paneli "Ovladacie prvky formulara" zapnite "Rezim navrhu".
4. Kliknite na ikonu "Tlacidlo".
5. Tahanim umiestnite tlacidlo na harok alebo stranku.
6. Kliknite pravym tlacidlom na tlacidlo a vyberte "Vlastnosti
ovladacieho prvku".
7. Na karte "Vseobecne" nastavte text tlacidla v poli "Popisok".
8. Prejdite na kartu "Udalosti".
9. Vedla polozky "Spustit akciu" kliknite na tlacidlo "...".
10. Vyberte svoje makro:
"Moje makra" alebo vas dokument -> kniznica -> modul -> nazov makra.
11. Kliknite na "OK" a zatvorte okno vlastnosti.
12. Vypnite "Rezim navrhu".
13. Kliknutim na tlacidlo spustite makro.
Inserts images into LibreOffice Calc cells based on a mapping table.
USAGE
1. Open "znova.ods", enable macros when prompted.
2. On the "Vyber" sheet, fill column "H" with image file paths and
column "I" with destination cell references (e.g. "Vysledok.B5")
and optional column "J" is for height in pixels while keeping the
aspect ratio.
3. Run the macro: Press the button.
Running again clears all previously inserted images and re-draws them.
ADDING A BUTTON TO RUN THE MACRO
You can add a push button directly to your sheet/page that runs the
macro with a single click. This works in Calc, Writer, and Draw.
1. Open your document.
2. Go to: View -> Toolbars -> Form Controls.
3. On the "Form Controls" toolbar, turn on "Design Mode".
4. Click the "Push Button" icon.
5. Drag on the sheet/page to place the button.
6. Right-click the button and choose "Control Properties".
7. In the "General" tab, set the button text in the "Label" field.
8. Go to the "Events" tab.
9. Next to "Execute action", click the "..." button.
10. Select your macro:
"My Macros" or your document -> library -> module -> macro name.
11. Click "OK", then close the properties window.
12. Turn "Design Mode" off.
13. Click the button to run the macro.