Trying to create a text document using lotusscript.On Win platform, using OpenOffice and OLE createObject(…), it works.
I would like do the same on Mac platform, using NeoOffice, but OLE is frustrating me.
Any ideas out there?
Tks in advance
Trying to create a text document using lotusscript.On Win platform, using OpenOffice and OLE createObject(…), it works.
I would like do the same on Mac platform, using NeoOffice, but OLE is frustrating me.
Any ideas out there?
Tks in advance
Subject: Just Text document, no formatting?
If it’s a pure text document you can use Lotus script File Writing functions, right? Create a plain text document without any formatting. It may be a good design practice to pass only data (text infromation) from Notes, and let the native tools (NeoOffice / OpenOffice) read the text document and do necessary formatting.
I do not know about NeoOffice / OpenOffice. But in MS Word there is a kind of functionality to have Templates. Lotus script just needs to pass only relevant information - or the information which changes from document to document. Such as current date, employee name etc. Rest of the text is written and formatted in MS Word template.
Regards,
Byju
Subject: RE: Just Text document, no formatting?
Byju,thank you for the response… but I didn’t understand.
When you write :
“let the native tools (NeoOffice / OpenOffice) read the text document and do necessary formatting”
it’s what I do now… using Notes and Windows (and OLE).
The problem is to make it work using Notes and Macintosh.
In particular, the command :
CreateObject(“Word.Application” / “com.sun.star.ServiceManager”)
returns error:
“Operation not supported on this platform”.
So, since the platform is MAC, how to pass the data (text information) to a file template (.doc, .odt, …) without using OLE?
Subject: RE: Just Text document, no formatting?
It is really just a text document, or is there something more you are trying to expose? Plain text can be created by LotusScript without any special COM, which is what Byju is suggesting as well. If you need more that that, what more? NeoOffice or OpenOffice should also read HTML files, and if you only have a little formatting, again, you could just use LotusScript to create the file.
Subject: RE: Just Text document, no formatting?
The goal is to obtain a “well formatted” file (i.e. with header, footer, page nbr, …) containing data stored in a Notes document.
The Windows way is to use a OO file (or MS word file) and pass data to it; this requires the “CreateObject” command.
The “CreateObject” command cannot be used in Mac environment.
Html file could be the solution, maybe, but I don’t know how to pass data and if the html file could be “well formatted” as I need.
Subject: RE: Just Text document, no formatting?
Not sure how this problem could be solved. But I thought since the problem starts with difficulties in controlling and communicating with NeoOffice software from within Lotus Script, the process should be divided into two parts.1) From Lotus Script write all required data into a Text file on the file system.
Idea is to divide the program into two. Lotus script part exports data. NeoOffice reads this data and do the formatting using APIs/macros avaialble locally. Both part 1 and part 2 need to be invoked separately.
Hope this helps, eventhough it looks like a conceptual solution rather than a specific one.
It may also help doing some resaerch around the NeoOffice software.
Regards,
Byju Joy
Subject: I give up
Byju,thanks for your response.
As I wrote, at last I gave up.
I was used with OLE and the solution thats invokes two separated proceduras seems inelegant.
…and I was asking to myself… what if I should manage an OO calc (or MS Excel) file from Mac? Same two separated proceduras?
Bah… I expected more interaction between (Mac) Notes and other programs…
Best regards
luciano
Subject: I give up
At last I give up.I made the templates directly writing RTF in a doc; text contains “” .
So, after a template is chosen, LS agent can copy the RTF text; using “FindAndReplace” method, are replaced and a “almost well formatted” doc is obtained.
Win, OLE and Mac are forgotten.