Jars28 General User

Joined: 24 May 2012 Posts: 10
|
Posted: Thu May 24, 2012 1:34 pm Post subject: Copying cell annotations ( comments ) from cell to cell |
|
|
| Code: |
Sub Copytime
oNewSheet = ThisComponent.Sheets(1)
oSourceSheet = ThisComponent.Sheets(0)
oCellnew = oNewSheet.getCellByPosition(0, 0)
oCellsource = oSourceSheet.getcellByPosition(0, 0)
oNewSheet.GetAnnotations.insertnew(ocellnew.celladdress, ocellsource.annotation.string)
End Sub
|
It took me four hours to figure this out. I though it would be as simple as "cell1.annotation = cell2.annotation" but, alas, it was not. _________________ Jared |
|