| View previous topic :: View next topic |
| Author |
Message |
thuber Newbie

Joined: 03 Feb 2009 Posts: 2
|
Posted: Tue Feb 03, 2009 10:16 am Post subject: uno dispatch calls |
|
|
Two questions for a calc macro:
1) This copies to the clipboard the currently selected cell:
| Code: | dispatcher.executeDispatch(document, ".uno:Copy", "", 0, Array())
|
Can I modify this so it copies a hard coded location(for example $B$1)
2) How can I modify the below snippet to save the currently selected cell, then later issue the dispatch to go to that cell.
| Code: | args1(0).Name = "ToPoint"
args1(0).Value = "$B$1"
rem dispatcher.executeDispatch(document, ".uno:GoToCell", "", 0, args1())
|
Thanks! |
|
| Back to top |
|
 |
thuber Newbie

Joined: 03 Feb 2009 Posts: 2
|
Posted: Wed Feb 04, 2009 2:34 pm Post subject: Saving currently selected cell |
|
|
I solved problem #2 by adding two subroutines::
| Code: | Global oSheet, oSel
Sub GetPos
oSel = ThisComponent.CurrentController.Selection
oSheet = ThisComponent.CurrentController.ActiveSheet
End Sub
Sub PutPos
ThisComponent.CurrentController.ActiveSheet = oSheet
ThisComponent.CurrentController.Select(oSheet.getCellByPosition( _
oSel.RangeAddress.EndColumn, oSel.RangeAddress.EndRow))
End Sub |
My question #1 I still don't have a solution, any help appreciated.
Thanks! -Tom |
|
| Back to top |
|
 |
|
|
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
|