NotesUIDocument

I have a view that every document needs to have a script running on the UIDocument (not the notesdocument). Normally, I would do a script to do while not eof on a notesdocument but what I’m wondering is there a way to automatically run down the view and run a script on each document in the UIDocument?

specifically, there’s a script that runs that will not run on the notesdocument class, only on the uidocument class. It also won’t run in an agent, so that’s out.

I know you can go to the backend document from the uidocument, but can you go from the backend document to the uidocument in a script? This particular script has to run on the CURRENT uidocument no matter where the notesdocument is set.

What I’m doing is I have a database that contains about 50,000 records and each record has an ole object. I have a script in the library that will take the uidocument’s rich text ole document and will save it as a file on the server. I have to transmit all of these files for a conversion so once they are saved to the disc as a doc.doc file, I create a new document exactly like the current document and put in the newly extracted file to it.

Currently, I have it so as soon as the document is physically opened it will convert the ole object and store it on the disc. But, with 50,000 records who has time to open each one.

I’m sure there’s probably a simple solution that I’m overlooking. Or not.

Thanks

Subject: NotesUIDocument…

I did a very similar thing on the same scale

See the NotesUIWorkspace class to open a UIDocument from Document object

Remember to use a good naming convention for the file names created, if you use the subject or whatever in the document, ensure that :

They are not too long

No Duplicates

Have no illegal characters.

You can track the document to it’s original NotesDoc.

Subject: NotesUIDocument…

You would need to open the document using NotesUIWorkspace.EditDocument (and close the doc again when you are finished with it, of course). Oh – you are going to want to hijack a workstation to do this rather than run it on a server. You will need the application that owns the embed type (Word for Word embeds, Excel for embedded spreadsheets, and so forth) installed on the machine that runs the code, and it is going to take some time to activate the embed, save the file and attach the file to a new document. A workstation will take the processing load off of the server, will avoid file IO permission problems, and make it unnecessary to install, say, MS Office on the server.