In höheren Versionen fehlt das Icon und ein Teil des Macros erscheint in der Leiste (Bild) Wie bekomme ich das wieder mit einem Icon hin, bzw wie kann ich per Tastenkombination (ähnlich Excel) das Datum einfügen? Anbei noch das Macro - eine Notiz die ich noch aus dem Jahr 2006 habe:
Sub Insert_Date_As_Text
Insert_As_Text( Date )
End Sub
sub Insert_As_Text( aValue As String )
oDesktop = createUnoService( "com.sun.star.frame.Desktop" )
oController = oDesktop.CurrentFrame.Controller
oDocument = oController.Model
' insert as text for Calc ----------------------
If oDocument.supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) Then
oSelection = oController.Selection
oSelection.Formula = "'" & aValue ' apostroph forces string
' insert as text for Writer --------------------
ElseIf oDocument.supportsService( "com.sun.star.text.TextDocument" ) Then
oSelection = oDocument.CurrentSelection( 0 )
oSelection.Text.insertString( oSelection, aValue, True )
EndIf
End Sub
hier haste die 2 sachen die du brauchst, das
Insert_Date_As_Text () musst du aufrufen bzw. die tasten zuordnen um das datum einzufügen, das andere wird hiervon aufgerufen!
Ich bekomme es nicht mehr hin
