Automatischer Zeichenzähler bei Save

Programmierung unter AOO/LO (StarBasic, Python, Java, ...)

Moderator: Moderatoren

Benutzeravatar
komma4
********
Beiträge: 5332
Registriert: Mi, 03.05.2006 23:29
Wohnort: Chon Buri Thailand Asia
Kontaktdaten:

Re: Automatischer Zeichenzähler bei Save

Beitrag von komma4 »

Vielleicht reichen Dir schon die Angaben aus/zur Dokumentenstatistik:

Code: Alles auswählen

aDokStat = ThisComponent.DocumentInfo.DocumentStatistic

for i = lBound( aDokStat ) to uBound( aDokStat ) 

	if ThisComponent.DocumentInfo.DocumentStatistic(i).Name = "CharacterCount" then 
		msgbox "Zeichenanzahl: " & ThisComponent.DocumentInfo.DocumentStatistic(i).Value
	end if

	if ThisComponent.DocumentInfo.DocumentStatistic(i).Name = "WordCount" then 
		msgbox "Wortanzahl: " & ThisComponent.DocumentInfo.DocumentStatistic(i).Value
	end if
	
next i 

Die Ausgabe der Werte ist Basic (sprich: praktisch identisch)


Hilft das weiter?
Cheers
Winfried
aktuell: LO 5.3.5.2 30m0(Build:2) SUSE rpm, unter Linux openSuSE Leap 42.3 x86_64/KDE5
DateTime2 Einfügen von Datum/Zeit/Zeitstempel (als OOo Extension)