Go Back   Access World Forums > Microsoft Access Discussion > Modules & VBA

Thread Tools Rate Thread Display Modes
Old 12-10-2015, 05:48 AM   #1
Mohsin Malik
Newly Registered User
Join Date: Mar 2012
Posts: 109
Thanks: 14
Thanked 1 Time in 1 Post
Mohsin Malik is on a distinguished road
Send a message via Yahoo to Mohsin Malik
Stephan Lebans RTF Control Append RTF text into another RTF Control

Hello All,

I am using Stephan Lebans RTF2 ActiveX Control. I have managed some template based text into another table called 'TemplateText', what I would like is to append these template text into another 'RTF Control'. How can I append the template text (RTF text) into another existing RTF Control? Please see the screenshot https://goo.gl/qlVpwW for quick reference.


Mohsin Malik is offline   Reply With Quote
Old 12-10-2015, 06:34 PM   #2
Join Date: Oct 2014
Location: Tucson, Arizona
Posts: 3,507
Thanks: 362
Thanked 974 Times in 943 Posts
sneuberg will become famous soon enough sneuberg will become famous soon enough
Re: Stephan Lebans RTF Control Append RTF text into another RTF Control

I don't know anything about the Stephan Lebans RTF2 ActiveX Control but you it seems you're being ignored so I thought I'd see if I could give you something. I've had to deal with rich text before, trying to get it from Access into Word with limited success partly because the HTML that you get out of rich text doesn't contain all of the information that was in the rich text.

Anyway I played with this with Access's rich text controls in the attached database and to my surprize I got something that seems to work. In the attached database you will find a form (RTF Form 1) which has a subform (RTF Subform 2) and a command button (Append Text) whose click event has the following code.

Private Sub AppendText_Click()

Dim db As DAO.Database
Set db = CurrentDb

db.Execute "UPDATE [RTF Table 1] SET [RTF Table 1].[Rich Text] = '" & SQE(Me.Rich_Text) & SQE(Me.RTF_Subform_2.Form![Rich Text]) & "'"


End Sub

Private Function SQE(str As String) As String

SQE = Replace(str, "'", "''")

End Function
So this just basically updates the control source of the RTF control with the text in it concatenated with the text in the subform and refreshes the form. If you can adapt this to your situation I suggest testing it thoroughly to make sure formatting isn't lost in this transfer.

Let us know this helps.
Attached Files
File Type: zip RTFMerge.zip (31.0 KB, 86 views)
And now nothing will be restrained from them, which they have imagined to do. Genesis 11:6

sneuberg is offline   Reply With Quote

activex , append , lebans , memo , rtf

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stephan Lebans Print To Pdf - Memory Problem, Office 2000 TimTDP Modules & VBA 6 01-14-2011 01:14 PM
Issues with Lebans RTF control PaulA General 3 03-19-2008 06:49 AM
Problem with Stephen Lebans Rich Text Control gruebz General 1 02-13-2008 05:11 AM
Specifying report filter in Stephan Lebans A2000ReportToPDF roypython Reports 2 05-30-2007 08:23 AM
Lebans RichText Control danposey General 0 11-29-2005 12:43 PM

All times are GMT -8. The time now is 01:45 PM.

Microsoft Access Help
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post

Sponsored Links

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World