VB Word Processor Problem!! HELP!

Posted on 2005-03-23
Medium Priority
Last Modified: 2010-05-02
if i put content like this below into the richtextbox
and more
and put a bullet on the line "more" by doing this

richtextbox.selbullet = true

and copy and paste all three lines, throughout the document a weird character that looks like an unbolded bullet appears after the line "more". Any ideas how this could be fixed?

Thanks for any help
Question by:jmingo
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2

Expert Comment

ID: 13631446
Ok, I've been looking into this for a while now, and I still don't have a definite solution...Here's what I've got so far:

When you copy and paste the text as you described, it adds

Chr$(183) & Chr$(9)

to the beginning of the line below the bulleted line. This corresponds to RTF:


(I think)

So my solution was to do this:

Private Sub RichTextBox1_Change()
    Dim lngSelStart As Long
    lngSelStart = RichTextBox1.SelStart
    'RichTextBox1.Text = Replace(RichTextBox1.Text, Chr$(183) & Chr$(9), "")
    RichTextBox1.TextRTF = Replace(RichTextBox1.TextRTF, "\'b7\tab", "")
    RichTextBox1.SelStart = lngSelStart
End Sub

Neither way works. The second one just makes the problem occur without copying and pasting (although the format of the Replace()'d text is correct, setting the RichTextBox contents to it does not seem to work correctly).

I'm thinking that this is a bug in the RichTextBox which may not be (easily) correctable...

Hmm.. I leave this open to other Experts for any more ideas ? I'm all out

Author Comment

ID: 13643719
yeah i've been looking into this too... and i can't seem to figure it out...

i print the rtf codes into a textbox and it still displays \'b7\tab's after i replace them. weird!!

Private Sub RichTextBox2_Change()

lngSelStart = RichTextBox2.SelStart    
RichTextBox2.TextRTF = Replace(RichTextBox2.TextRTF, "\'b7\tab", "")
RichTextBox2.SelStart = lngSelStart
Text1.Text = RichTextBox2.TextRTF

End Sub

i think it is a bug. there is a free richtext control on vbaccelator, that doesn't do this... i may have to look into that.

any other thoughts??? thanks for your help.

Expert Comment

ID: 13839803
The only reason to keep the question PAQ'd (refund the points of course) would be to advise others who may come across the same problem that it cannot (apparently) be fixed, and is in fact an inherent problem of the Rich Text Box control.

Accepted Solution

PAQ_Man earned 0 total points
ID: 13882553
PAQed with points refunded (25)

Community Support Moderator

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month11 days, 22 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question