Is there a Word 2007 event when the caret moves?

W

Wei Lu [MSFT]

Hello Dave,

Based on my research, I did not find the event to indicate the caret
position change.

I would like to know better about your situation and what you want to do.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
D

David Thielen

Hi;

Our program AutoTag - http://www.windwardreports.com/AutoTag.htm inserts and
edits tags in a Word document. These tags take the form <wr:eek:ut
select="/root/name"/>

So if the caret is in the text of a tag we enable the button "Edit Tag" and
disable the button "Insert Tag". If the caret is in regular text, then we
enable "Insert Tag" and disable "Edit Tag".

So each time the caret position changes we need to see if we are in a tag
and enable/disable if the mode has changed.

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
W

Wei Lu [MSFT]

Hello Dave,

I am perform research on this and try to contact the product team. I
appreciate your patience.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
W

Wei Lu [MSFT]

Hello Dave,

Some internal team member suggestted you use the
Application::WindowSelectionChange

Is this what you want?

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
S

Scott McPhillips [MVP]

Wei said:
Hello Dave,

Some internal team member suggestted you use the
Application::WindowSelectionChange

Is this what you want?

I've been following this thread because I have a similar requirement.
WindowSelectionChange will help!

Thanks for the tip :)
 
W

Wei Lu [MSFT]

Hello Dave,

I did not find any event to capture the type.

I think you need to reselct the tag after you type the char.

Sincerely,

Wei Lu
Microsoft Online Community Support

==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
C

Cindy M.

Hi =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=,
Unfortunately we can't tell our users to reselect after typing each character
:)
ON re-reading your requirement... I don't see how the user can move between tags
by typing characters? The WindowSelectionChange event should fire whenever
anything is used that could move in/out of a tag.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
D

David Thielen

One exception - and it happens regularly. You type "hello <wr:eek:ut
select="/root/node"/> hi there"

In the course of the typing you go into and out of a tag. We support typing
the tags in as plain old text as version 1.0 only supported that.

On the flip side, people rarely go to the menu while typing like this so in
practice it's rarely an issue. But it bugs me as a programmer because we
can't do it "right."

--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com

Cubicle Wars - http://www.windwardreports.com/film.htm
 
C

Cindy M.

Hi =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?=,
One exception - and it happens regularly. You type "hello <wr:eek:ut
select="/root/node"/> hi there"

In the course of the typing you go into and out of a tag. We support typing
the tags in as plain old text as version 1.0 only supported that.

On the flip side, people rarely go to the menu while typing like this so in
practice it's rarely an issue. But it bugs me as a programmer because we
can't do it "right."
I can identify with that :)

The only other suggestion I can offer would be to trap the use of < and > in
VBA macros (since KeyBindings can only be assigned to VBA) or by going outside
of Word and using the Windows API to check what's being typed. I know it can
be done, I've seen apps that use this, but I can't tell you the details of how
they've done it...

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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