Copying documents attacment to a new doc as an OLE object

15 pts.
Tags:
embedObjects
Lotus Agents
Lotus Notes 7.x
Lotus Notes 8.x
LotusScript
OLE objects
I'm building an application (-agent actually-) which should take the attachment of the received mail document and create a new document holding this attachment (usually pdf file) as OLE object. I have all bits and pieces ready except taking the attachment from inbound maildoc and attaching it to new doc as new OLE object. remarks *Taking file, saving it to the hard-drive and making OLE object from file on the hd is not working solution at this point. The script is meant to be running as an agent in the server and due to server restrictions in new file writing this will not work. I already have a solution which transfers the attachment. This is poor solution for my case because it is essential to preview the doc when document is opened. With OLE implementation this could be easily done. Here's the actual codepart which needs to be altered ... ... 'get the rich text field (where the attachment is) Set body = doc.GetFirstItem("Body") Set ndoc = New NotesDocument ( db ) ndoc.form = "NEWFORM" 'copy this to the new doc Call ndoc.CopyItem( body, "Body" ) 'save new doc etc... ... Oh. and my client/servers are 8.0. Also 7.0 solutions or older will do. Thank you very much! Also java may be ok.
ASKED: April 2, 2008  11:39 AM
UPDATED: June 4, 2008  12:46 PM

Answer Wiki

Thanks. We'll let you know when a new response is added.

OLE is a Windows technology, so to create an embedded object on a server you would need a Windows server and permission from the server admins to work with the file system — it sounds like this is what you lack.

There is a form option to launch the first attachment in a document automatically when the document is opened. Perhaps this would be of some use to you?

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • Entsu
    Ok. Thank you for you answer! Maybe i try this solution... I was wondering. Is there a possibility to preview attached pdf-files with third party (or possible free) preview component? Java-applet for example?
    15 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following