yes this is possible using a macro, such as:
Function WordCount_Total() As Long
Dim lCount As Long
lCount = ThisComponent.WordCount REM standard document word count.
lCount = lCount + WordCount_Textboxes() REM include word count from textboxes.
WordCount_Total = lCount
End Function
Function WordCount_Textboxes() As Long
REM This function returns the total number of words within all Textboxes in the current document.
Dim lCount As Long, oShape as Object
Dim oDrawpage : oDrawpage = ThisComponent.getDrawPage()
For i = 0 To oDrawpage.getCount() - 1
oShape = oDrawPage.getByIndex( i )
If HasUNOInterfaces( oShape, "com.sun.star.text.XTextAppend" ) Then
lCount = lCount + WordCount_String( oShape.getString() )
End If
Next
WordCount_Textboxes = lCount
End Function
Function WordCount_String( sString$ ) As Long
REM Returns the number of words in the specified string.
Dim i As Long, j As Long, lCount As Long
Dim sWordList() As String
Dim sSeparators() As String : sSeparators = Array( chr(9), chr(13), chr(32) )
For i = 0 To Ubound( sSeparators )
sWordList = Split( sString, sSeparators( i ) )
If Ubound( sWordList ) > 0 Then
For j = 0 To Ubound( sWordList )
If sWordList( j ) <> "" Then lCount = 1 + lCount
Next
End If
Next
WordCount_String = lCount
End Function
HTH, lib