Carissim*,
sono riuscito ad avere il codice di due macro
che fanno quanto richiesto...
nell'alternativa commerciale a LibreOffice ;)

Io cercavo una macro che potesse

- andare automaticamente a capo,
creando una nuova riga, dopo l'85simo carattere;

- superata l'85sima colonna, scrivere con sfondo colorato
(il testo però deve tornare nero su bianco dopo essere andato a capo)

Le due macro sono sotto gli asterischi.
La domanda è: qualcuno di voi sarebbe così gentile
da tradurmele nel basic di LibreOffice?

Grazie del vostro tempo in ogni caso :)
Buona serata!

Michele


******************************************************************
Sub DividiParole()

    Car = 0
    Spazio = 0
    Selection.HomeKey Unit:=wdLine

    Do While Car <= 42
    If (Selection = vbCr) Then Car = 0
    If (Selection = " ") Then Spazio = Car
    If (Car = 42) And (Selection = " ") Then
        Selection.MoveRight Unit:=wdCharacter, Count:=1:
        Selection.TypeParagraph: Car = 0:
        Spazio = 0
    End If
    If (Car = 42) And (Selection <> " ") Then
        Selection.MoveLeft Unit:=wdCharacter, Count:=(Car - Spazio - 1):
        Selection.TypeParagraph: Car = 0:
        Spazio = 0
    End If
    Selection.MoveRight Unit:=wdCharacter, Count:=1
    Car = Car + 1
    If Selection = "@" Then Exit Sub
    Loop
    DividiParole
End Sub

Sub ColoraParole()

    Car = 0
    Selection.HomeKey Unit:=wdLine

    Do While Selection <> "@"
    Car = Car + 1
    Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend
    If Car <= 85 Then
        Selection.Font.ColorIndex = wdBlack
    Else
        Selection.Font.ColorIndex = wdRed
    End If
    If (Selection = vbCr) Then Car = 0
    Selection.MoveRight Unit:=wdCharacter, Count:=1:
    Loop

End Sub
******************************************************************

-- 
Come cancellarsi: E-mail users+unsubscr...@it.libreoffice.org
Problemi? http://it.libreoffice.org/supporto/mailing-lists/come-cancellarsi/
Linee guida per postare + altro: 
http://wiki.documentfoundation.org/Local_Mailing_Lists/it
Archivio della lista: http://listarchives.libreoffice.org/it/users/
Tutti i messaggi inviati a questa lista vengono archiviati pubblicamente e non 
sono eliminabili

Rispondere a