Reading Fields in a Header of Word.

U

Unknown

I am trying to read the fields in a Header of a Word Document. But I am
getting some odd problem.

when I am reading field in the body of word document word by word from
range, I am getting in order as below if <<MY_NAME>> is the field
i) <<
ii)MY
iii)_
iv)NAME
v)>>
When I am reading the same from the header, I am getting first <<. When in
this stage, I am also retreiving the position of the words and saving. so
When I am retreiving the positiong of <<, the range.Text is changing suddenly
to <<MY_NAME>>. Is there some bug in Word Library which is making the Text
change to <<MY_NAME>>
Below is the command I am using to retreive the X coordinate of the word.
_rngProp._X =
(float)(_rng.get_Information(WdInformation.wdHorizontalPositionRelativeToPage));
So the next word is coming to be \r after this so I am not bale to get the
field name :(
Can someone help me out but this abnormal situation ?
 

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