Double clicking on a word very nicely selects that word only and not the punctuation (for instance) following it.
In VB / CS3 if I use InD.Selection(1).Words(1) it includes from the cursor to the space on either side of the word selecting the quotes that might be around the word as well.
Is there some other say of getting the word in which the cursor is planted?
Well, not really. You can defiine what a word is differently and split it up yourself using whatever string functions you would like. This reduces to a "how do I do that in VB" question, though. You could start with a line, but in your case, I think you want to start with the existing definition of a word.
which is a regular expresson that matches zero or more non-alphanumerics at the beginning (which are thrown away), followed by any number of any characters, followed by zero or more non-alphanumerics at the end (which are thrown away). With the beginning and ending matches being "greedy," filling as much as they can, and the middle match being non-greedy. And alphanumeric includes underscore.
I hear VBScript now has regular expressions (who knew?), but they seem to be rather verbose. So you can allegedly use:
dim word set re = New RegExp re.Pattern = "/^\W*(.*?)\W*$/" word = re.Replace(InD.Selection(1).Words(1), "\1")
Oh well, at least it doesn't have automatic implied global variables and gratuitous semicolon insertion on line breaks...
I bet this is a place where VB can do a lot better than JS though. Left as an exercise to the reader ;-)