Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8133347
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:34:36+00:00 2026-06-06T09:34:36+00:00

Currently we are attaching a file to a Lotus Document with the following code:

  • 0

Currently we are attaching a file to a Lotus Document with the following code:

final RichTextItem rtitem = document.createRichTextItem(referenceName);

final int type = EmbeddedObject.EMBED_ATTACHMENT;
final String clazz = null;
final String source = file.getFileName();
rtitem.embedObject(type, clazz, source, name);

document.save();

Unfortunately the source parameter of the embedObject method has to be a path of a file in the file system. Is it possible to embed an object from a stream somehow? The embeddable content currently is in the memory, so it’s not too efficient (and clean) to write it out to a file and let the Lotus API to read it again.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:34:38+00:00Added an answer on June 6, 2026 at 9:34 am

    The rtitem class only can attach files, not streams. However you can use MIME and the Lotus MimeEntry classes to create an attachment from anything that you can read. This LotusScript code sample should give you all you need to get started. The API is the same for Java. Let us know how it works for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I was recently looking at a piece of code that was attaching a file
Currently I'm trying to write my first Python library and I've encountered the following
Currently i'm working on my final year project. In a webpage which loads data
Currently, what I'm doing is this: Using the built-in .NET PrintPreviewDialog Attaching my own
I'm writing some quick code to try and extract data from an mp3 file
For a system I am currently building, the following two scenarios occur: My permissions
Currently, my application automatically encrypts its own App.config file the first time the application
i am attaching the code. In this code i am taking a string which
Currently we use jQuery to add RIA goodness to our apps, but recently we
Currently I have a class that looks like this: public class MyClass : IMyClass

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.