Lotus Notes rich text field to RTF File - VB - vb.net

I am doing a data migration from Lotus notes to another type of software that does not support Rich Text Fields. I am trying to write a VB 2005 program that will take any rich text fields that are found and place them into an RTF file - which will be uploaded as an attachment in the new software.
I cannot get the program to take the rich text formating or objects to the RTF file, only the plain text. I have tried everything under the sun using the COM library to get these objects out to no avail.
Any ideas or suggestions?
Thank you in advance
Bryan

There is an undocumented C api call "ExportRTF". Julian Robichaux has an example of using it in a database here:
http://www.nsftools.com/tips/NotesTips.htm#rtfexport
"Here's a database I wrote with some code that allows you to export the information in a Notes rich text field to an RTF file, while retaining most or all of the rich text field formatting. It also demonstrates how to write multiple things to a single RTF file (including multiple rich text fields), if that's something you're interested in doing. Additionally, the techniques involved should allow you to export rich text fields that are greater than 64k in size "

The Notes rich-text structure is proprietary and you will not be able to directly export a Notes rich-text item into a Windows rich-text formatted file. It is possible to have Notes store rich text fields in HTML/MIME format (rather than the proprietary format), which you could then export to a file and attach as a .htm file as an attachment in your new software (if that would meet your requirements). If you are interested, there are some details in answers to this Stack Overflow question:
How to export Rich Text fields as HTML from Notes with LotusScript?

Related

Does Acrobat Acroform support internal small database and export to text features?

I want to create a editable pdf, using Acroform Technology, with the following features, so I would like to know if is it possible before I start diving into learning it:
1 - I want that the javascript script can read some small database (I mean, data hidden inside de pdf document). So, for example, if the user write in a textbox "Silvia", javascript can brings the Silvia's sallary that is in a sallary table hidden inside the pdf.
2 - From pushing a button, javascript script can export to a text file some data that is inside the pdf (from form elements and databases inside de pdf).
Is both features possible using Acroform?
Feature 1 is no problem; you may work with arrays, and then convert them to strings you can put in (hidden) fields for saving and reopening the document.
Feature 2 will most likely require Acrobat (Pro), as there are still some limitations in Reader.

Open pdf file in Microsoft Word using OLE

I am looking for the method (of Word ole-object) which can open pdf in the Microsoft Word.
I want to copy all pages of pdf into doc/docx and add there footers.
Could anybody give the cue how to import pdf?
PS: any sample code for this problem would be great.
Thanks,
Lilya
You need OCR (Optical Character Recognition) engine for converting PDF to document. PDF is generic format and it can include text as image. So it is very hard to convert PDF to document. SAP hasn't got any OCR function for doing this. Maybe OpenText (if customer using it) has this functionality, I haven't got detail information about opentext. You need third party tools for this. You can use online services or command line utilities to converting PDF files to text files easelly if PDF included text, otherwise you need professional SDKs (for example Abbyy Finereader) for doing this.
I used FoxIT PDF Reader to save the PDF file into text file and make a macro to read the text file. Of course, by doing so, you can only get the text, but nothing else.

Creating RTF text for clipboard and sharing DataPackage in WinRT

I'm sure this is just a google search away, but I can't find the right search terms to find what I'm looking for.
I've created a DataPackage that has both HTML annd plain text content. I've used this in my copy and my sharing code and it works fine. I now want to create RTF output as some apps don't seem to accept HTML clipboard content.
I'm looking for a good guide to making RTF text that can be added to the DataPackage. I just need simple formatting including changing the font family, font size, font weight and adding newlines. The data comes from a list of objects taht I want to serialise as RTF, not from a text control on the screen.
WordPad outputs fairly clean RTF and some other text editors do as well. If that's not enough, you can download the RTF Specification 1.9.1 although like any specification that's probably overkill for what you're doing.
You can also use the SaveToStream method on the Document property of a RichEditBox from a Metro style app to share out as well.

PDF, PPT, DOC, etc to TEXT

Maybe these should be separate questions, one for each format, but...
What are the most RELIABLE libraries (in any language), binaries (for any platform), or webservices (free or not free) for converting diverse "text-containing" formats into plain text?
By reliable, I mean near 100% ability to extract ALL of the human-readable text while NOT EXTRACTING "code" or "markup".
By text-containing formats, I mean: all the most common things like PDF, PPT, DOC, DOCX, RTF, HTML, ".PAGES", ".KEYNOTE", ODT, etc etc
Please suggest both packages/services that support many of these formats as well as those that only support one. In addition, are there software "stacks" that "tie together" many packages/services for the purpose of converting to text?
http://www.filebuzz.com/files/Ascii_Convert/1.html <--This link will take you to a list of converters that can convert a PDF and other types of files to an ASCII format (plain text).
For Word documents, you can do this with out a software. For example, for Word documents, when you click 'Save As', it will open up a dialog box that will have a 'Save as Type' drop down list. Select 'Plain Text *.txt' and it will save your file in plain text. Good Luck!
In Java, the Apache Tika toolkit detects and extracts metadata and structured text content from various documents using existing parser libraries.
If you're using Ruby, take a look at Yomu. It's a wrapper for Apache TIKA and supports a variety of document formats which includes the following:
Microsoft Office OLE 2 and Office Open XML Formats (.doc, .docx, .xls, .xlsx, .ppt, .pptx)
OpenOffice.org OpenDocument Formats (.odt, .ods, .odp)
Apple iWorks Formats
Rich Text Format (.rtf)
Portable Document Format (.pdf)
You can try Extract Text.
From the description: "Extract text from documents such as PDF and Microsoft Word files. It will save the extracted text in a file. Works with .pdf, .doc, .docx, .xls, .xlsx, .ppt, and many more." Requires Microsoft.NET Framework 4.0.

Transferring Rich Text data from Access to Word

I've been saddled with supporting an old Access 2003 database (with SQL backend) produced by a now out-of-business contractor.
The database includes several 'unconventional' reports. They all use Automation through VBA to output fields directly to a Word document. Kind of like this (pseudo code):
for each row{
output(row.id);
moveRight();
output(row.firstName);
newLine();
}
Etc.
The problem is, the database includes several rich text fields. To output these (including their formatting) to the document, the developer opens a separate Access form, with a single rich text control, and pulls the appropriate field into the text box.
He then does a 'select all, copy', flicks back to Word, and then pastes the text.
My task is to add a new rich text field to a report, and I feel there must be a better way of doing this...
Ah! A duplicate question apparently.
Here's the answer:
Word Automation: Write RTF text without going through clipboard