OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

Copying cell annotations ( comments ) from cell to cell

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets
View previous topic :: View next topic  
Author Message
Jars28
General User
General User


Joined: 24 May 2012
Posts: 10

PostPosted: Thu May 24, 2012 1:34 pm    Post subject: Copying cell annotations ( comments ) from cell to cell Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Code Snippets All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group