Detecting cursor move between paragraphs 
Author Message
 Detecting cursor move between paragraphs

I have created an Add In that needs to be notified when
the cursor moves between paragraphs. The behavior I would
like to mimic is when you have a line set to "Heading 2"
and you move the cursor into and away from the formatted
line, the formatting toolbars change to reflect the
current paragraph. I need to update my combo at the same
time.

All I need to know is how do I detect when moving to a
new 'some object'. I can figure out the rest. I could just
set up a timer and constantly poll the current selections,
but I would be happier with a solution such as an event
sink.

Tim S.



Thu, 14 Oct 2004 02:43:00 GMT  
 Detecting cursor move between paragraphs
I was browsing the ng and posted to the wrong thread by
mistake. Feel free to delete this thread.

Tim



Thu, 14 Oct 2004 02:58:12 GMT  
 Detecting cursor move between paragraphs
Look up the WindowSelectionChange event in the VBA help file.

Mark Baird

Quote:
> I have created an Add In that needs to be notified when
> the cursor moves between paragraphs. The behavior I would
> like to mimic is when you have a line set to "Heading 2"
> and you move the cursor into and away from the formatted
> line, the formatting toolbars change to reflect the
> current paragraph. I need to update my combo at the same
> time.

> All I need to know is how do I detect when moving to a
> new 'some object'. I can figure out the rest. I could just
> set up a timer and constantly poll the current selections,
> but I would be happier with a solution such as an event
> sink.

> Tim S.



Thu, 14 Oct 2004 10:00:29 GMT  
 Detecting cursor move between paragraphs
The WindowsSelectionChange event is fired if the cursor is moved from one
place to another; but -- perhaps unfortunately for what you are trying to
do -- this doesn't include cursor movements as a result of typing text or
pressing enter at the end of the line.


Quote:
> I have created an Add In that needs to be notified when
> the cursor moves between paragraphs. The behavior I would
> like to mimic is when you have a line set to "Heading 2"
> and you move the cursor into and away from the formatted
> line, the formatting toolbars change to reflect the
> current paragraph. I need to update my combo at the same
> time.

> All I need to know is how do I detect when moving to a
> new 'some object'. I can figure out the rest. I could just
> set up a timer and constantly poll the current selections,
> but I would be happier with a solution such as an event
> sink.

> Tim S.



Thu, 14 Oct 2004 13:19:30 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Moving cursor to specific paragraph

2. Detecting Mouse Movement BEFORE Cursor Moves?

3. Detecting Mouse Movement BEFORE Cursor Moves?

4. Detecting Mouse Movement BEFORE Cursor Moves?

5. Cursor at beginning of paragraph

6. cursor in first paragraph

7. How to move to the beginning of a paragraph

8. Moving paragraphs based on style

9. moving a paragraph

10. Moving back one paragraph from bookmark

11. How to detect left-indentation of a paragraph

12. Detecting bulleted / numbered paragraphs

 

 
Powered by phpBB® Forum Software