Hallo, 

> From: Helmut Schütz [mailto:[email protected]] 
> Sent: Wednesday, January 09, 2019 10:57 AM
> To: Users-Liste openoffice.org

> Mein Makro für das Zeichen ē sieht dann zum Beispiel so aus:
> 
> sub eoberstrichklein
> 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 
> ----------------------------------------------------------------------
> dim args1(0) as new com.sun.star.beans.PropertyValue
> args1(0).Name = "Text"
> args1(0).Value = "ē"
> dispatcher.executeDispatch(document, ".uno:InsertText", "", 
> 0, args1())
> end sub
> 
> Die einzige Frage, die bleibt: Ist das die einzige Art, ein solches 
> Makro zu schreiben, oder ginge es evtl. auch einfacher?

z.B. ginge auch:

Sub eoberstrichklein()
        On Error Goto fehler
        
        vcur = ThisComponent.GetCurrentController.ViewCursor
        vCur.String = "ē"
        Exit Sub
        
        fehler:
        Msgbox "falsche Cursorposition/Auswahl", 16, ""
End Sub




Gruß
Jörg


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Antwort per Email an