X

Geertjan's Blog

  • June 19, 2006

Rapid Scam Letter Creator

Geertjan Wielenga
Product Manager
As mentioned in my previous blog entry, I met Wouter van Reeven, an Open Office API expert, at the NL-JUG conference in Holland (on Thursday). He used NetBeans IDE 5.0 for his presentation, in which he introduced the Open Office API to his audience (which included me). We agreed to work together to produce some simple samples (and some more complex ones too, maybe), demonstrating the power of the Open Office API in combination with the NetBeans Platform (Wouter attended my presentation on that topic, so we now both know what kind of content we're each able to contribute). Today I received from him some code, simple code that prints out a name from a textfield into an Open Office (or Star Office document). It worked straight out of the box for me. Getting it to work on the NetBeans Platform was a bit more work. But here it is, slightly extended from Wouter's original, my very first Open Office API application on the NetBeans Platform:

When you type in a name, select a 'conclusion', and click "Generate Letter", an Open Office document (or Star Office document), as specified in the Options window, opens in "listen mode". In other words, the OfficeBean is not used in this example. Then, the selections (and the body, which cannot be changed) are written to the document:

Because the application is on the NetBeans Platform, extending it is going to be easy. I can use the same update center mechanism that the IDE uses, simply by including the IDE's modules that relate to this functionality. Also, using one menu item in the IDE, a ZIP file containing the application, as well as an executable for launching it, is generated. Same story for JNLP-related artifacts.

Wouter and I intend to write an article for http://www.javalobby.org, possibly a primer (i.e., quick start) on Open Office API and NetBeans Platform. But we haven't decided yet what form it will take, however we have agreed to work on something on this general subject for javalobby soon.

Join the discussion

Comments ( 8 )
  • Azri Monday, June 19, 2006
    So where do I get the tutorial for this Scam Letter Creator?
  • guest Monday, June 19, 2006
    So where do i get the tutorial for this scam letter tutorial?
  • Geertjan Monday, June 19, 2006
    Hi Azri, well, most of it will probably appear in some form on javalobby.org, but that depends on what Wouter and I decide to do there. Otherwise, there'll be a NetBeans tutorial on this sometime soon. Which aspects are you most interested in (that would help me in knowing what to focus on)?
  • opsi Tuesday, June 20, 2006
    Hi, how many things should one do with that OO api? I mean, will it be possible to create complex tables, with images and so programatically using OO as the backend? Maybe i'm loosing the point....
  • Geertjan Tuesday, June 20, 2006
    Hi opsi, I think a LOT is possible with this API. I am only beginning to explore it, and it looks great; the documentation (the Developer Guide) is very good too. Lots of examples, for example. Keep following this blog, because I'll be adding more info here on what I've been discovering.
  • Jeroen Leenarts Sunday, June 25, 2006
    Nice to read this entry, I actualy pondered about it for a while if I should attend the <a href="http://www.nljug.org/pages/events/content/jspring_2006/sessions/00011/"Open Office session at the NL-JUG. But I went to the performance tuning session instead.
  • Jeroen Leenarts Sunday, June 25, 2006
    Nice to read this entry, I actualy pondered about it for a while if I should attend the Open Office session at the NL-JUG. But I went to the performance tuning session instead.
  • herman Monday, July 10, 2006
    That generator isn't believable or plausible (english isn't my native language)
    You should improve it see

    The 3rd Annual Nigerian EMail Conference

    "Write better emails. Make more moneys."

    Workshop:

    Grammatical errors: What's the optimal number?

    Hope it will be in OOo 2.0.4 soon!
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.