Any way? Not by ready-made means, I’m afraid, in specific not by settings implemented with the paragraph style concept as it is. You need to do it by “hard” assignment of an appropriate characzter style.
You can define a named pragraph style (may otherwise be identical with Default e.g.) and a named character style you want to apply to the initial word s of paragraphs haveing the mentioned style assigned.
Then you only need a little “macro” for the task. Resorting to “macros” always comes with disadvantages, however.
See the example FirstWordAsInitial.
Code:
Sub setCharStyleFirstWord(Optional pDoc As Object, Optional pText As Object, _
Optional pParaStyleN As String, Optional pCharStyleN As String)
REM This way to use a missing optional parameter as a local variable is
REM not supported in very old versions of LibO and in AOO.
If IsMissing(pDoc) Then pDoc = ThisComponent
If NOT pDoc.supportsService("com.sun.star.text.TextDocument") Then Exit Sub
If IsMissing(pText) Then pText = ThisComponent.Text
If IsMissing(pParaStyleN) Then pParaStyleN = "paraInitialWord"
If IsMissing(pCharStyleN) Then pCharStyleN = "charInitialWord"
oldSel = pDoc.CurrentSelection
cur = pText.createTextCursorByRange(pText.Start)
REM Now the WORKING code:
Do While pText.compareRegionEnds(cur, pText.End)>0
If cur.ParaStyleName=pParaStyleN Then
cur.gotoEndOfWord(True)
cur.CharStyleName = pCharStyleN
End If
cur.gotoNextParagraph(False)
Loop
REM Done!
ThisComponent.CurrentController.select(oldSel)
End Sub