Translations:Macros/Python Guide/My first macro/7/it

From The Document Foundation Wiki
Jump to navigation Jump to search

def my_first_macro_writer():

   doc = XSCRIPTCONTEXT.getDocument()
   text = doc.getText() # com.sun.star.text.Text
   text.setString('Ciao Mondo in Python in Writer')
   return 

</syntaxhighlight>