PasteCorrectData.bas

 Attribute VB_Name = "PasteCorrectData"
Public Function PasteFromClipboard()
    With MainScr
        If Clipboard.GetFormat(vbCFRTF) Then
            .rtfText.SelRTF = Clipboard.GetText(vbCFRTF)
            .rtfText.SetFocus
            Exit Function
        ElseIf Clipboard.GetFormat(vbCFBitmap) Then
            SendMessage .rtfText.hwnd, WM_PASTE, 0&, 0&
            .rtfText.SetFocus
            Exit Function
        ElseIf Clipboard.GetFormat(vbCFText) And Not Clipboard.GetFormat(vbCFRTF) Then
            .rtfText.SelText = Clipboard.GetText(vbCFText)
            .rtfText.SetFocus
        End If
    End With
End Function

Project Homepage: