Format selected text in RTF Memo field in MS Access 2007

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ACF
    New Member
    • Jun 2007
    • 5

    Format selected text in RTF Memo field in MS Access 2007

    Hello,

    I’m trying to format only selected text in an RTF Memo field in Access 2007



    I’m able to copy selected text in a Memo field to the Windows clipboard with following code:

    Private Sub Memo_MouseUp(Bu tton As Integer, Shift As Integer, X As Single, Y As Single)



    DoCmd.RunComman d acCmdCopy



    End Sub



    But I would like to know if there is anyway that I can format that selected text.

    I’ve tried the below:

    Me.Memo.FontSiz e = 15



    But this formats the whole field. How can I change the FontSize (color, weight etc.) of only the selected text?



    Greetings,

    ACF
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Originally posted by ACF
    Hello,

    I’m trying to format only selected text in an RTF Memo field in Access 2007



    I’m able to copy selected text in a Memo field to the Windows clipboard with following code:

    Private Sub Memo_MouseUp(Bu tton As Integer, Shift As Integer, X As Single, Y As Single)



    DoCmd.RunComman d acCmdCopy



    End Sub



    But I would like to know if there is anyway that I can format that selected text.

    I’ve tried the below:

    Me.Memo.FontSiz e = 15



    But this formats the whole field. How can I change the FontSize (color, weight etc.) of only the selected text?



    Greetings,

    ACF
    Try applying the SelStart and SelLength Properties to the specific selected Text, then apply the formatting.

    Comment

    • missinglinq
      Recognized Expert Specialist
      • Nov 2006
      • 3533

      #3
      Also, be aware that, in previous versions of Access, any type of formatting of memo fields causes them to be truncated to 255 characters when used in queries! Spell checker also corrupts rich text fields if they contain carriage returns! I would backup the db before trying any of this, then run it thru any queries you're apt to use to look at the results!

      Comment

      Working...