Is there a way to put Rich Text formatted text into Word.Basic creation which will keep the RTF formats so I can spell check the text, select it and then put it back into the rich text box? here's my code currently which works, but it uses copy and paste and I was trying to see if there was a way around using them. I tried to do .Insert strTextToVerify instead of pasting the string fromt he clipboard but it pasted the actually formatting as part of the string, which screws up the spell checker.
here's what i got so far, though i'd rather not be using copy and paste.
VB Code:
  1. Private Function SpellCheck(ByVal strTextToVerify As String) As String
  2.     'This function uses word to spell check the passed string
  3.  
  4. Dim sNewText As String
  5. Dim oWord As Object
  6.  
  7. Set oWord = CreateObject("Word.Basic")
  8.    
  9. Clipboard.Clear
  10.      
  11. With oWord
  12.      .AppShow
  13.     .FileNew
  14.      Clipboard.SetText strTextToVerify, vbCFRTF
  15.     .EditPaste
  16.     .ToolsSpelling
  17.     .EditSelectAll
  18.     .EditCopy
  19.     sNewText = Clipboard.GetText(vbCFRTF)
  20.     oWord.FileClose 2
  21.     oWord.FileExit
  22. End With