Solved

Export Notes record as RTF file using C API

Posted on 2006-11-29
6
1,592 Views
Last Modified: 2013-12-18
Hi

I need to export notes records as Microsoft RTF files.
Just like using File>Export and choosing Microsoft RTF.
I need to do it with via .NET application (using c API or Notes COM). Can't run any LS or add anything to the database.
There's a function called ExportRTF on nxrtf.dll that should do the job, but I can't get it running from .NET application.

Any help would be appreciated.

thanks
Yoni
0
Comment
Question by:tzYoni
  • 3
6 Comments
 
LVL 63

Expert Comment

by:SysExpert
ID: 18039634
please post your code, and maybe we can fix it.

I hope this helps !

0
 
LVL 63

Expert Comment

by:SysExpert
ID: 18039666
see

http://www.experts-exchange.com/Applications/Email/Lotus_Notes_Domino/Q_21499863.html

and specifcally

 Comment from ovalsquare
Date: 07/21/2005 10:30PM EST
      Author Comment       

SysExpert: well...appreciate the somewhat better direction, but I'm looking for C#.NET or VB.NET, not the C API. I'm going to dig into it further, but thus far, I have trouble believing there are no better samples out there for doing what must be a fairly common scenario.

sjef_bosman: Just what I'm looking for other than Single developer - US $795. Ouch! You've got to be kidding me! I just want access to the address book which there should be no need to go so high-powered.

Here's what I've got that functions to send off an email (although doesn't open it up for further editing, requires email address, etc.):

        Dim Maildb As Object
        Dim MailDoc As Object
        Dim Body As Object
        Dim Session As Object
        'Start a session to notes
        Session = CreateObject("Notes.NotesSession")
        'Open the mail database in notes
        Maildb = Session.GETDATABASE("", "C:\Program Files\lotus\notes\data\mail\ted.nsf")
        If Not Maildb.IsOpen = True Then
            Maildb.Open()
        End If
        'Create the mail document
        MailDoc = Maildb.CREATEDOCUMENT
        MailDoc.Form = "Memo"
        'Set the recipient
        MailDoc.sendto = "ted@somewhere.com"
        'Set subject
        MailDoc.Subject = "Subject text"
        'Create and set the Body content
        Body = MailDoc.CREATERICHTEXTITEM("Body")
        Call Body.APPENDTEXT("Body text here")
        'Example to create an attachment (optional)
        Call Body.ADDNEWLINE(2)
        'Call Body.EMBEDOBJECT(1454, "", "C:\filename", "Attachment")
        'Example to save the message (optional)
        MailDoc.SAVEMESSAGEONSEND = True
        'Send the document
        MailDoc.PostedDate = Now() 'Gets the mail to appear in the Sent items folder
        Call MailDoc.SEND(False)
        'Clean Up
        Maildb = Nothing
        MailDoc = Nothing
        Body = Nothing
        Session = Nothing

Of course, it's not all really updated to .NET, but it works. Because it does, again, I have trouble believing there's not a simple solution already existing out there that will open up a new email with the Body and Subject already specified, but with To: field empty etc. I've done it with Outlook, Outlook Express, written an internal email application, but hooking it up with Lotus is rather interesting.

Thanks for any and all help!

Ted


0
 
LVL 63

Expert Comment

by:SysExpert
ID: 18039674
0
 
LVL 18

Accepted Solution

by:
marilyng earned 500 total points
ID: 18060082
Hi tzYoni,
If you check here:http://www.nsftools.com/tips/NotesTips.htm#rtfexport

this download might provide good examples for how to accomplish your task.

Regards!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Creating a bat file fo Note.ini 4 223
Email relaying to outside address 4 173
Add a cc field to email code 6 100
Adding a named anchor in a Lotus Notes Form 6 99
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
Article by: Rob
Notes 8.5 Archiving Steps and Tips This article covers setting up a Notes archive, and helps understand some of the menu choices making setting up and maintaining a Notes archive file easier.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question