Export to Word

With all the hype in Java, J2EE, SOAP, XML etc etc, it’s funny how in our daily lives as developers get to do some of those ‘good old’ things with the Notes client, like exporting to Word. I had a requirement to export data from Notes documents to MS Word (no problem, done it a million times) so I pursued with this:

Call wordDocObj.Content.Find.Execute(”find this”, , , , , , , , , “replace with this” )

That’s pretty standard, however this being a Find & Replace operation, it’s limited to small strings (so forget adding a whole paragraph). So I had to resort to bookmarks on the Word document and this:

Call wordDocObj.Bookmarks(”this bookmark”).Select
Call wordDocObj.ActiveWindow.Selection.TypeText (”replace with this”)

By the way, I heard that Google turned 5 this year - happy birthday Google!

chris on September 8th 2003 in Uncategorized

One Response to “Export to Word”

  1. J responded on 19 Feb 2004 at 2:06 pm #

    I’ve done a large amount of Notes to Word work - epecially exporting Notes data to word for reporting purposes. Sometimes I muck around with cut & Paste document 2 back into document 1 - therefore building one document with many pages :)
    This works well but often I have gotten stuck because I need to do some specific Word function. For reference I capture a new Macro and examine the VB code, then go searching for wordbasic equivalents.. this can be a slow process!

    My point is does anyone have a single comprehensive wordbasic reference with examples! I have used the wordbasic.hlp reference but often struggle with the exact syntax (i.e. dropping these commands into lotusscript)..

    any help appreciated… !