Re: Makro zum Text kopieren und Variable hochzählen
Verfasst: Do, 13.03.2014 21:20
Ich verstehe das genaue Ziel nicht, also wo die Texte hin sollen.
Folgendes Makro schreibt sie in Spalte A einer Calc-Tabelle:
Gruß
Stephan
Folgendes Makro schreibt sie in Spalte A einer Calc-Tabelle:
Code: Alles auswählen
Sub Main
txt = ""
For i = 1 to 999
tmp = String(4-LEN(i),"0") & i
txt = txt & "<a href=""img/Fotos/Bild"
txt = txt & tmp
txt = txt & ".jpg"" data-lightbox=""Obst""><img src=""img/Fotos/Bild"
txt = txt & tmp
txt = txt & "_thumbnail.jpg""></a>"
ThisComponent.Sheets(0).getCellRangeByName("A"&i).String = txt
txt = ""
Next i
End Sub
Stephan