PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN DEFINE CLASS form1 AS form Top = 0 Left = 0 Height = 333 Width = 507 DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT ortf AS olecontrol WITH ; Top = 24, ; Left = 12, ; Height = 240, ; Width = 481, ; Name = "oRtf" ADD OBJECT command1 AS commandbutton WITH ; Top = 290, ; Left = 49, ; Height = 27, ; Width = 84, ; Caption = "Merge", ; Name = "Command1" ADD OBJECT command2 AS commandbutton WITH ; Top = 290, ; Left = 373, ; Height = 27, ; Width = 84, ; Caption = "Exit", ; Name = "Command2" PROCEDURE Init Thisform.oRtf.SelStart = 0 Thisform.oRtf.SelLength = 99999 Thisform.oRtf.SelText = "" ENDPROC PROCEDURE Load Thisform.AddProperty("aRtfText[1]") DIMENSION Thisform.aRtfText[5] Thisform.aRtfText[1] = "{\rtf1\fbidis\ansi\ansicpg1256\deff0\deflang1025{\fonttbl{\f0\fswiss\fcharset0 Arial;}" + ; "{\f1\fswiss\fcharset178{\*\fname Arial;}Arial (Arabic);}}\viewkind4\uc1\pard\rtlpar\lang1033\f0\fs20 This is line 1 for rtf copy and paste test.\lang1065\f1\rtlch\par}" Thisform.aRtfText[2] = "{\rtf1\fbidis\ansi\ansicpg1256\deff0\deflang1025{\fonttbl{\f0\fswiss\fcharset0 Arial;}" + ; "{\f1\fswiss\fcharset178{\*\fname Arial;}Arial (Arabic);}}{\colortbl ;\red255\green0\blue0;}" + ; "\viewkind4\uc1\pard\rtlpar\cf1\lang1033\f0\fs20 This is line 2 for rtf copy and paste test.\lang1065\f1\rtlch\par}" Thisform.aRtfText[3] = "{\rtf1\fbidis\ansi\ansicpg1256\deff0\deflang1025{\fonttbl{\f0\fswiss\fcharset0 Arial;}" + ; "{\f1\fswiss\fcharset178{\*\fname Arial;}Arial (Arabic);}}{\colortbl ;\red0\green0\blue0;}" + ; "\viewkind4\uc1\pard\rtlpar\cf1\lang1033\b\f0\fs20 This is line 3 for rtf copy and paste test.\lang1065\f1\rtlch\par}" Thisform.aRtfText[4] = "{\rtf1\fbidis\ansi\ansicpg1256\deff0\deflang1025{\fonttbl{\f0\fswiss\fcharset0 Arial;}" + ; "{\f1\fswiss\fcharset178{\*\fname Arial;}Arial (Arabic);}}{\colortbl ;\red0\green0\blue0;}" + ; "\viewkind4\uc1\pard\rtlpar\cf1\lang1033\i\f0\fs28 This is line 4 for rtf copy and paste test.\lang1065\f1\rtlch\par}" Thisform.aRtfText[5] = "{\rtf1\fbidis\ansi\ansicpg1256\deff0\deflang1025{\fonttbl{\f0\fswiss\fcharset0 Arial;}" + ; "{\f1\fswiss\fcharset178{\*\fname Arial;}Arial (Arabic);}}{\colortbl ;\red0\green0\blue0;}" + ; "\viewkind4\uc1\pard\rtlpar\cf1\lang1033\ul\f0\fs28 This is line 5 for rtf copy and paste test.\lang1065\f1\rtlch\par}" ENDPROC PROCEDURE command1.Click FOR i=1 TO ALEN(Thisform.aRtfText) Thisform.oRtf.SelStart = 0 Thisform.oRtf.SelLength = 9999999 Thisform.oRtf.SelStart = Thisform.oRtf.SelLength-1 Thisform.oRtf.SelRtf = Thisform.aRtfText[i] ENDFOR ENDPROC PROCEDURE command2.Click Thisform.Release() ENDPROC ENDDEFINE>Pervious function have some problem and I can not use from it.