Solved

Export Notes record as RTF file using C API

Posted on 2006-11-29
6
1,561 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
Comment Utility
please post your code, and maybe we can fix it.

I hope this helps !

0
 
LVL 63

Expert Comment

by:SysExpert
Comment Utility
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
Comment Utility
0
 
LVL 18

Accepted Solution

by:
marilyng earned 500 total points
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now