Wie kann ich in dem Makro das Datumformat so ändern, dass auch noch der Tag dabei steht ?
Also nicht nur 29.11.2014 .... sondern Sa.29.11.2014
Ansonsten hat alles wunderbar geklappt.
Code: Alles auswählen
Sub Drucken
Dim Anzahl as integer
oDoc = thisComponent
oController = oDoc.getCurrentController()
oform=odoc.drawpage.forms.getbyindex(0)
oKontroll = oForm.getByName("Datumsfeld 1")
iDate = oKontroll.date
Anzahl = inputbox("Bitte Anzahl eingeben:","Dokument drucken")
for i = 0 To Anzahl -1
oText = oDoc.Text
oFrames=odoc.getTextFrames()
oFrame=oFrames.getByIndex(0)
oFrameCursor=oFrame.createTextCursor()
oFrameCursor.gotoEnd(true)
oFrameCursor.String = "Datum: " & CDateFromIso(iDate) +i
Dim printProp() as New com.sun.star.beans.PropertyValue
oDoc.Print(printProp())
Wait 1000
next
MsgBox "Der Druckauftrag ist abgeschlossen. " ,64, "Dokument drucken"
End Sub
_________________
Moderation: Zur übersichtlichen Darstellung des Textes und des Programmcodes im Text [code][/code] Tags gesetzt.
Thema geteilt und von OOo Writer hierher verschoben, wo alle Themen zur individuellen Programmierung hingehören.
lorbass, Moderator