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

From The Document Foundation Wiki
Jump to: navigation, search

def my_first_macro_writer():

   doc = XSCRIPTCONTEXT.getDocument()
   text = doc.getText()
   text.setString('Hello World in Python in Writer')
   return 

</syntaxhighlight>