RE: Word. VC++6.0. How I can retrieve current number row? by JeanGuyMarcil
JeanGuyMarcil
Wed May 07 08:05:01 PDT 2008
"Antonio" wrote:
> Hello,
> I have an application in VC++ 6.0. This application creates a .DOC file for
> Word2007. In this file I insert text and image (.bmp)
>
> This is my problem:
> When I insert text and/or image how I can retrieve current row?
> I need to get current number row. Someone can help me with sample code in
> VC++?
What do you mean by "Row"?
Are you inserting your text and bitmap in a table?
If not, there is a "line" property in Word 2003 and above, but it is not
straight forward to use...
What do you mean by "Current"? Since you are automating the document
creation, there is no such thing as a "Current" selection.
Once you answer these questions, I can probably provide sample code in VBA,
not C++, you will need to translate it...
Finally, why don't you tell us why you need this information...? There might
be an easier way of doing things... If you use the Range object, you do not
need to know "line number" to know where you are at...