|
-
Mar 4th, 2008, 08:44 PM
#1
Thread Starter
Junior Member
[2005] Re: [2005] How to get number of selcted text in MS word
Thank so much for your helping.
your coding is not match that i want. i want code in vb.net to get number of selected text in MS word.
For example,
Imports Microsoft.Office.Core
Imports Microsoft.Office.Interop
Dim wapp As Word.Application
Dim wdoc As Word.Document
wapp = GetObject(, "Word.Application")
wapp = Nothing
wdoc = wapp.ActiveDocument
wapp.Visible = True
wapp.activedocument.range.text 'if i write like this i will get all text from MS word.
but i want to get number of selected word in MS word, for example, if i select the word "boy" in MS word then i want vb.net code to returns 3 "Number of word selected". In textbox we just write textbox.selected. please help me.
Thank very much.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|