This project has moved and is read-only. For the latest updates, please go here.

wdFieldNext field is added but it is not visible.

Jun 7, 2013 at 4:27 PM
I have to create functionality, where I have to add Next Field in word file with <<Next Record>> as a display text, same as "Update Labels" functionality provided by word.
I have programmatically added Address label in word (.dot) file . Then when i am adding Next field into each cell, it is not visible because text is empty.

I have added wbFieldNext in, as follows

tbLabel = m_CurrentDoc.Tables(1)
cSource = tbLabel.Cell(1, 1)
oRange = cSource.Range
m_CurrentDoc.Fields.Add(range:=oRange, type:=Word.WdFieldType.wdFieldNext, text:="<<Next Record>>", preserveFormatting:=False)

But when I used wdFieldNext in my code then "Next" field is added in each cell, but without any text. If we check properties of that field, it is Next Field.

How Can I change text property of wdFieldNext field in each cell or Is there any other way to add NEXT field in word?

Thanks in advance.