OK I've created a complete solution for this:
I created a vb6 executable which takes command line paramters for RTF_File_In and TXT_File_Out.
What is the best way to allow the user to edit the text, store it in a access database, and then upon completion, export to a MS Word file, all the while preserving the formatting? I guess i assumed the Rich Text in Access is the same as Rich Text in VB is the same as Rich Text in a Word document.
it takes the RTF file contents and sends the plain text contents to the designated file;
- Microsoft Access Convert Rich Text To Plain Text Or Html. 8/9/2017 0 Comments. The monumental. There are two primary reasons that computer users will convert a JPG file to text: 1 – To convert a text document that has been saved as an image back to text. Visual Basic Editor in Access 2. Access editions. Comparisons between Microsoft.
- Total Access Memo lets you add rich text format (RTF) memos to Microsoft Access with sophisticated editing and spell checking. Our super-easy data binding means you can display rich text on your forms and reports and store it in your tables.
- Oct 17, 2018 In this tutorial I will teach you how to convert rich text to plain text with VBA code or using an update query.
this can then be called from within SQL Server at will.
What is the best way to allow the user to edit the text, store it in a access database, and then upon completion, export to a MS Word file, all the while preserving the formatting? I guess i assumed the Rich Text in Access is the same as Rich Text in VB is the same as Rich Text in a Word document. Remove RTF codes on MS Access plain text memo field. Rich Text object is removed if booSingleRun is True. ' ' 2001-05-27. Cactus Data ApS, CPH. Microsoft Access.
Hanka paldum hitovi. Teh vb6 source code,sample file, and sample stored proc are included in the zip file located here:
In my example, i placed everything on the root of the C: drive for testing, you'll need to move them to the proper spot..maybe the bin folder of SQL server. the stored proc doesn't do much more than open a file quickly and bulk insert it into a table, from which you could then fiddle with it if necessary:
CREATE PROC sp_RTF2TEXT(@RTFFileIn VARCHAR(255),@TXTFileOut VARCHAR(255) )
AS
BEGIN
--usage sp_RTF2TEXT 'c:test.rtf', 'c:ewfile.txt'
--note that this function will not take kindly to spaces in a filename
SET NOCOUNT ON
DECLARE @COMMAND VARCHAR(1000)
SET @COMMAND = 'c:FreeRTF2Text.exe ' + @RTFFileIn + ' ' + @TXTFileOut
EXEC master.dbo.xp_cmdshell @COMMAND
CREATE TABLE #tempRTF (line varchar(8000))
EXEC ('bulk INSERT #tempRTF FROM ' + @TXTFileOut + '')
SELECT * FROM #tempRTF
DROP TABLE #tempRTF
END
Lowell
--help us help you! If you post a question, make sure you include a CREATE TABLE.. statement and INSERT INTO.. statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!In the .mdb versions of Access, working with rich text wasn't impossible, but it certainly wasn't easy. With some slick VBA code or a third-party control you could get it, but it was a lot of work. Access 2007 and 2010 now support easy-to-implement rich text formatting, but only in memo fields.
Rich text means formatted text, but a bit more. Specifically, earlier versions don't allow you to single out a specific word or character within an entry for different formatting. It was all or nothing. Behind the scenes, Access is actually using HTML - something that probably won't matter to most users, but might matter to SharePoint and database developers and anyone upgrading an .mdb database to the .accdb format.Using Access 2010, let's take a quick look at how to apply the rich text setting:- Add a memo field to a table.
- In the Field Properties pane, choose Rich Text from the Text Format properties dropdown list.
- Save the table.