- This topic has 3 replies, 3 voices, and was last updated 17 years ago by Chike.
-
AuthorPosts
-
October 11, 2007 at 9:15 am #187718methodMember
Hi all . could any one show me how i can copy the text that i just wrote in paltalk edit box before sending it to main by pressing for example F1. After sending F1 i want to use word to do spell check over it. i have already done it for vb6 edit box but not sure how to do it for paltalk. Hope some one help me.Thanks
Private Sub Command2_Click()
Dim objWord As Object
Dim objDoc As Object
Dim strResult As String 'Create a new instance of word Application
Set objWord = CreateObject("word.Application")
Select Case objWord.Version 'Office 2000
Case "9.0"
Set objDoc = objWord.Documents.Add(, , 1, True) 'Office XP
Case "10.0"
Set objDoc = objWord.Documents.Add(, , 1, True)
'Office 97
Case Else ' Office 97
Set objDoc = objWord.Documents.Add
End Select
objDoc.Content = Text1.Text
objDoc.CheckSpelling
strResult = Left(objDoc.Content, Len(objDoc.Content) - 1)
If Text1.Text = strResult Then ' There were no spelling errors, so give the user a
' visual signal that something happened
MsgBox "The spelling check is complete.", vbInformation + vbOKOnly
End If 'Clean up
objDoc.Close False
Set objDoc = Nothing
objWord.Application.Quit True
Set objWord = Nothing ' Replace the selected text with the corrected text.It 's important that ' this be done after the "Clean Up" because otherwise there are problems ' with the screen not repainting
Text1.Text = strResult
Exit Sub
End SubOctober 12, 2007 at 2:42 am #187721ChikeMemberFor plain text WM_GETTEXT message should work. How to set the text back with the original color I am not sure. I am guessing EM_REPLACESEL message but never tried it.
On how to find the edit control, you’ll have to look in code examples or programs code posted on this board.October 12, 2007 at 12:54 pm #187720methodMemberchike i am not worried abut the text color . So could your or any one else show me how to copy paltalk editbox typed text and send it to word for spell checking and paste back the final text? i don’t know how to use WM_GETTEXT!!
October 12, 2007 at 7:42 pm #187719 -
AuthorPosts
Related
- You must be logged in to reply to this topic.