Currently I am looping through all sections and formfields to find a particular one and change its value. Is there a way to jump directly to it much like the ability with bookmarks?
foreach (var sec in doc.Sections.Cast<Section>())
{
foreach (Spire.Doc.Fields.FormField ff in sec.Body.FormFields)
{
if (ff.Name == "Benefit66Yes")
{
var cb = ff as CheckBoxFormField;
cb.Checked = true;
yesfound = true;
}
if (ff.Name == "Benefit66No")
{
var cb = ff as CheckBoxFormField;
cb.Checked = false;
nofound = true;
}
if (yesfound && nofound)
break;
}
if (yesfound && nofound)
break;
}
with bookmarks, we can jump directly to it:
var bookmark = doc.Bookmarks.FindByName(bookmarkName);