Selection-Object with wrong values?

D

DanielH

Hello,

currently I am trying to write a tool that shows some information about the
text the user is writing in Word.
I am doing this the following way:
A Word-PlugIn with a Keybord-Hook (because there is no enter-text-Event).
When the Hook registeres a KeyUp it get's the current paragraph with
Selection.Paragraphs[1].Range.Text and sends it via Named Pipes to my
application.
The Problem now is, that I need the insertion point in the text. I tried to
get it with Selection.Start-Selection.Paragraphs[1].Range.StartSelection.
But that doesn't work always correctly. When I am typing it is always 128 +
the real position... But when I am using the arrow-keys to navigate in the
text, the value is correct.

Anyone has any suggestions on how to solve this problem?
Any suggestions on how to have a Enter-Text-Event inside Word without using
a Keyboard-Hook would be nice, too.

Thanks a lot in advanve
 

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