Seite 1 von 1

Re: Automatischer Zeichenzähler bei Save

Verfasst: Mi, 25.06.2008 15:41
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?