Cumhur Ata
Cumhur Ata

Reputation: 809

How do i read field value from MS Word attached to Lotus Notes Document in XPages

I have a notes document with an attached MS Word file. MS Word file has some fields defined as bookmark in it. is there any way to read fields values from that attached MS Word File? That MS Word file is created via POI Bookmark option.

I really like to know It's possibility...

Regards C.A.

Upvotes: 0

Views: 78

Answers (1)

stwissel
stwissel

Reputation: 20384

The short answer: don't do it in JavaScript.

The long answer (and it will save you tons of time):

Create a Java class that has a method taking a Notes document and an attachment name as parameter to a method, returning a Map<String,String> with field names and values.

Build the inner function using POI. Test the whole thing from command line (Obviously you need a helper class to init your Notes Session and get the document). You will find plenty samples for POI you can use there.

When all of that is working, you can write in your SSJS:

         var extractor = new com.yourcorp.Extractor();
          var result = extractor.getFields(doc, attName);

That is the only SSJS part you would use. Let us know how it is going.

Upvotes: 1

Related Questions