If you have the cell, can you get the text object? Do you know how to do this after you have a text object?
Johnny Andersson wrote:
Hi!
I tried to Xray the contents of a cell but I couldn't find the answer for my question anyway. Maybe language problems or peharps I'm just stupid...
What I am trying to do is to write a macro which transpose chord information. Like if a cell contains "Amaj7" and I want to transpose it by +4 steps, the result would be "C#maj7". To make it look good, I would, if I entered it manually, first enter the "C", then click Format - Character... - Position - Superscript (33%, 70%) - OK, then enter the "#", then click Format - Character... - Position - Normal, and then finally enter "maj7". Now the "#" is a bit smaller and positioned a bit higher than the other characters, just the way I want it to be.
This looks good, but how to do it with a macro? Maybe I misunderstood something completely, but I couldn't really figure how to set different properties for different characters in a string in a cell...
Anyone? Help would be appreciated...
I tried to record a macro for this and the result was the following nonsense code:
sub Test
rem ----------------------------------------------------------------------
rem define variables
dim document as object
dim dispatcher as object
rem ----------------------------------------------------------------------
rem get access to the document
document = ThisComponent.CurrentController.Frame
dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")
rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:FontDialog", "", 0, Array())
rem ----------------------------------------------------------------------
rem dispatcher.executeDispatch(document, ".uno:FontDialog", "", 0, Array())
rem ----------------------------------------------------------------------
dispatcher.executeDispatch(document, ".uno:JumpToNextCell", "", 0, Array())
end sub
Of course this didn't work, why would it?
I use the Swedish version of OOo 1.1.4 so maybe some of the names of stuff mentioned above are not correct.
-- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm Free Info: http://www.pitonyak.org/oo.php
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
