Click to See Complete Forum and Search --> : Microsoft.Office.Interop.Word question


irinic
December 10th, 2009, 04:15 AM
Hello, All!

I am using Microsoft.Office.Interop.Word namespace.

I have some editor where some text typed. I have a number of current cursor position (sorry, I'm writing in C++ but resembling questions are in this thread, so I ask here).

m_pSelection->get_Range( &pRange );
long nEnd;
pRange->get_End( &nEnd ); // nEnd is position

How can I get:
1) line where cursor placed
2) text of this line?

Please help.