Open word attachment from agent and create a doc in new database with content from the attachment

I have a email that comes in with attachment, it’s always going to be word document. I’d like to be able to open somehow the attachment then do something like a select all (it’s will be text only) and then create a new document in another database and paste the content of that word document… any idea how it could be done. I’d like to use Lotusscript to do the trick.

Thanks!

Subject: open word attachment from agent and create a doc in new database with content from the attachment

Jacques,

Use the EmbeddedObjects collection of the body rich text field to get a handle on the Word document. Save it to a file.

Create a word application object using CreateObject function.

Use the word application object to do a select all / copy (please consult MSDN for the specific technique for doing this - it is simple).

Create the destination document in the desired database.

Use the NotesUIWorkspace.EditDocument method to open the document in the UI and get a NotesUIDocument object.

Set focus to the rich text item where you want to store the Word document.

Use the paste method of the NotesUIDocument to paste in your content from Word.

Save and close your new doc.

HTH

Subject: RE: open word attachment from agent and create a doc in new database with content from the attachment

Thanks. finally got it working!! :o)