Re: Rich Text Control (RTF)
For "InsertStringAt" , you can use
.SelText = NewTextString
To insert ole objects, i am checking how to do. will post it here, if i can find.
RK
Re: Rich Text Control (RTF)
This thing works for inserting the bmp pictures into RTB. Check it out:
Take one form. put one RTB.
Change the szfilename to valid file on your system and run
option Explicit
private Sub Form_Click()
RichTextBox1.SelStart = 3
RichTextBox1.SelText = "[new hi there]"
End Sub
private Sub Form_DblClick()
Dim lpobj as OLEObject
Dim szfilename as string
szfilename = App.Path & "\ttt444.bmp" ' put some valid file name here
set lpobj = RichTextBox1.OLEObjects.Add(, , szfilename)
lpobj.DisplayType = rtfDisplayContent
' if you un comment the following line you will go to edit mode:
'lpobj.DoVerb
End Sub
private Sub Form_Load()
me.RichTextBox1.Text = "Hi there"
End Sub
RK