Current Position?

T

tbannist

How do I determine what the current insert point is in the document?

Alternatively, how do I select the current word (if any) that the user is
typing?
 
J

Jean-Guy Marcil

tbannist was telling us:
tbannist nous racontait que :
How do I determine what the current insert point is in the document?

????
Selection.Start ?
Alternatively, how do I select the current word (if any) that the
user is typing?

???? again!
Selection.Words(1).Select ?

Please, be more forthcoming with details and we will all appreciate it. Now,
we have to take a stab in the dark, or use crystal-ball-like-power to guess
what you really want to know...


--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
C

Chuck

Selection.Information can return some positioning information - see VBE Help
on the subject.

To select the current word:
Selection.Words(1).Select
 
T

tbannist

Jean-Guy Marcil said:
tbannist was telling us:
tbannist nous racontait que :


????
Selection.Start ?


???? again!
Selection.Words(1).Select ?

Please, be more forthcoming with details and we will all appreciate it. Now,
we have to take a stab in the dark, or use crystal-ball-like-power to guess
what you really want to know...

Thanks, that's what I was looking for, just a general way of determine where
the insert point is currently in the document.

I'm writing an add-in that will look at the current word being typed and
suggest some completions. If the user picks a completion it will replace the
current word with the selected one.
 
J

Jean-Guy Marcil

tbannist was telling us:
tbannist nous racontait que :
Thanks, that's what I was looking for, just a general way of
determine where the insert point is currently in the document.

I'm writing an add-in that will look at the current word being typed
and suggest some completions. If the user picks a completion it will
replace the current word with the selected one.

Just curious as to why you want to re-invent wheel?
This is exactly what Autotext does...
Have you checked it out, if so, why do feel you need to re-write that
functionality?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
T

tbannist

Jean-Guy Marcil said:
Just curious as to why you want to re-invent wheel?
This is exactly what Autotext does...
Have you checked it out, if so, why do feel you need to re-write that
functionality?

Autotext doesn't do exactly what I want it to do.

1) As I understand it, there's a built in limit to Autotext shortcuts of
50,000 or so, I need to accomodate approximately 150,000 short cuts.

2) I want to display upto 10 possible completions for each word. Autotext
displays only 1.

2) I also need to have the shortcuts cascade so that as the user types the
choices for the current word will be updated with each letter, AutoText
doesn't display anything until it knows exactly what word is to be displayed.
 
J

Jean-Guy Marcil

tbannist was telling us:
tbannist nous racontait que :
Autotext doesn't do exactly what I want it to do.

1) As I understand it, there's a built in limit to Autotext
shortcuts of 50,000 or so, I need to accomodate approximately 150,000
short cuts.

2) I want to display upto 10 possible completions for each word.
Autotext displays only 1.

2) I also need to have the shortcuts cascade so that as the user
types the choices for the current word will be updated with each
letter, AutoText doesn't display anything until it knows exactly what
word is to be displayed.

Wow, that is a monster of a project!
I hope the overhead in following what is being typed and comparing to a
database of 150,000 entries does not slow down Word to a crawl! Have you
tested it? I would be curious to know about the impact on performance.
Good luck!

May I ask for what kind of user this is being written?

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
H

Helmut Weber

Hi,

and this is the beginners' group!

If it has to be, learn about organizing databases,
e.g. in binary trees and how about creating a typeahead,
also called autocomplete or incremental search functionality.

Good luck from Bavaria also.

Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 
T

tbannist

Jean-Guy Marcil said:
Wow, that is a monster of a project!
I hope the overhead in following what is being typed and comparing to a
database of 150,000 entries does not slow down Word to a crawl! Have you
tested it? I would be curious to know about the impact on performance.
Good luck!

Not yet. I'm still struggling with getting the basic mechanisms to work
correctly. Hoooking the keyboard was a major problem, and now it's crashing
whenever I replace a word.
May I ask for what kind of user this is being written?

It's mostly aimed at medical transcriptionists, though if I do this
correctly, it will hopefully be elegant enough to be of use to other
professionals too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top