Unanswered: Select text from memo and paste as new record in table
In a form i have two fields with memo's. Next to each field there is a button.
The goal is to select some text (one or more words) and press the button which should add the selected text to a new record in another table.
In a second phase the inserted part from the memo should reformatted differently from the other text of the memo in order to see it's already inserted. But only those words at this location. e.g. if "the" is selected and inserted only this "the" should change to red or italic or whatever and not al the "the"s from the entire text.
I'm afraid i'm not too much help, but the first part may be possible by highlighting the data to copy and copy it to the clipboard. From there you could add a command button that would get the data from the clipboard and insert it into a table.
I don't believe there is a .selectedtext or equivalent feature for a text control.
The second part I don't think is possible in Access. You are wanting to change formatting on only certain words, as far as I know that is not possible, but I only have Access 2003.
You can easily copy a string to the clipboard using:
Public Sub CopyToClipBoard(ByVal Text As String)
' This function needs a reference to the Microsoft Forms 2.0 Object Library
Dim MyData As DataObject
Set MyData = New DataObject
Set MyData = Nothing
Note: This function works in Access 2003. Other versions of Access could need a reference to a different version of the Microsoft Forms Object Library.