Skip to main content
This forum is closed to new posts and responses. New discussions are now taking place in the IBM Developer Answers forum.
Information Mgmt
New to Lotus
How to buy
Live demos
Technical library
Forums & community
Java™ technology
Open source
SOA and Web services
Web development
My developerWorks
About dW
Submit content

developerWorks  >  Lotus  >  Forums & community  >  Notes/Domino 8 Forum

Notes/Domino 8 Forum

Previous Next
Subject: Can I move an attachment from the $FILE into the Body field?
Feedback Type: Problem
Product Area: Notes 8 Client
Technical Area: Application development
Platform: Windows XP client
Release: 8.0.2
Reproducible: Intermittent


Our customer used to attach huge (500Mb) files into the Body (RTF) field on the main document of that Production Server DB, but the process was not good because it used to tie up the user Notes Client while the file was being attached. So the customer asked us to provide a solution.
Then we figured that a local agent would make it easier so that the user just select the files, which would be temporary placed in a temp folder in the HD. Then, in a local DB (user machine), the scheduled agent goes to the temp folder and uploads the files in background, without tying up the Notes client.
Each 5 minutes the agent looks for files to be attached. One file is uploaded at the time and one file is attached per document. The agent attaches the file in the Body field (see part of the code below).

Dim rtitem As NotesRichTextItem
Dim object As NotesEmbeddedObject
Dim fileName$

fileName$ = doc.FileName(0)

Set rtitem = New NotesRichTextItem( doc, "Body" )
object = rtitem.EmbedObject (EMBED_ATTACHMENT, "", fileName$ )


doc.Completed = "Yes"
Call doc.ComputeWithForm( False, False )
doc.Save(True, False)

The solution works fine the majority of times, but we are not being able to understand one situation:
For some files, they are being attached directly to the document. The $FILE is there with the file stuff, but the Body field is empty...
We do not know what happens to the Body field, because it is intermittent, but my real problem is that the customer is not happy seeing the file at the bottom line of the document (instead of in the Body field, which is blank).

1) Can someone explain what is going wrong with my agent?

2) Can I place the file back to the Body field? How?

Any tip would be much appreciated. Thanks in advance.


Feedback number PSSA7X2QFD created by Paulo Sergio Silveira on 10/21/2009


Search this forum

Member Tools

RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS
More Lotus RSS feeds


Forum use and etiquette
Native Notes Access
Web site Feedback

Lotus Support

 Lotus Support
IBM Support Portal - Lotus software
Lotus Support documents
Lotus support by product
Lotus support downloads
Lotus support RSS feeds


IBM Composite Applications
IBM Mashup Center
IBM Connections
IBM Connections Cloud Developers
IBM Docs
IBM Forms
IBM Mobile Connect
IBM Sametime
IBM SmartCloud for Social Business
IBM Web Experience Factory
Lotus Domino
Lotus Domino Designer
Lotus Expeditor
Lotus Foundations
Lotus iNotes
Lotus Instructor Community Courseware
Lotus Notes
Lotus Notes & Domino Application Development
Lotus Notes Traveler
Lotus Protector
Lotus Quickr
Lotus Symphony
IBM Web Content Manager
WebSphere Portal

Lotus Forums

 Lotus Forums
Notes/Domino 9.0
Notes/Domino 8.5 + Traveler
Notes/Domino XPages development forum
Notes/Domino 8
Notes/Domino 6 and 7
IBM Connections
IBM Mobile Connect
IBM Sametime
IBM SmartCloud Notes
Lotus Enterprise Integration
Lotus Protector
Lotus Quickr
Lotus SmartSuite