avendo tante
Da una prima ricerca non è venuto fuori nulla, quindi immagino non si possa fare, ma prima di mollare volevo chiedere anche a voi.
Grazie a chi mi aiuterà.
Si veda, ad esempio, l'argomento Can I export/print a list of the comments in a Calc spreadsheet?.
Codice: Seleziona tutto
Sub collectComments
Dim oSheets As Variant, oSheet As Variant, oAnnotations As Variant, oAnnotation As Variant
Dim oParent As Variant, sAuthor As String, sDate As String, sAnnotationText As String
Dim i As Long, j As Long, k As Long, aRes As Variant
oSheets = ThisComponent.getSheets()
aRes = Array(Array("Address","Content","Author","Date","Comment"))
k = 0
For i = 0 To oSheets.getCount()-1
oSheet = oSheets.getByIndex(i)
oAnnotations = oSheet.getAnnotations()
For j = 0 To oAnnotations.getCount()-1
oAnnotation = oAnnotations.getByIndex(j)
oParent = oAnnotation.getParent()
sAuthor = oAnnotation.getAuthor()
sDate = oAnnotation.getDate()
sAnnotationText = oAnnotation.getString()
k = k + 1
ReDim Preserve aRes(0 To k)
aRes(k) = Array(oParent.AbsoluteName, oParent.getString(), sAuthor, sDate, sAnnotationText)
Next j
Next i
If UBound(aRes) > LBound(aRes) Then
GlobalScope.BasicLibraries.LoadLibrary("Tools")
CreateNewDocument("scalc").getSheets().getByIndex(0).getCellRangeByPosition(0, 0, UBound(aRes(0)), UBound(aRes)).setDataArray(aRes)
EndIf
End Sub
bèh che dire, grazie infinite ! mi hai risparmiato ore e ore e giorni di copia e incolla, e soprattutto ha salvato la mia salute mentalecwolan ha scritto: ↑venerdì 25 luglio 2025, 20:18 Ciao,
Si veda, ad esempio, l'argomento Can I export/print a list of the comments in a Calc spreadsheet?.
La macro crea un nuovo documento Calc con un elenco di commenti. Questo elenco può essere esportato, copiato e così via.