GetFieldNames

FieldAddressBlock.GetFieldNames method

Renvoie une collection de noms de champs de publipostage utilisés par le champ.

public string[] GetFieldNames()

Exemples

Montre comment obtenir les noms de champs de publipostage utilisés par un champ.

Document doc = new Document(MyDir + "Field sample - ADDRESSBLOCK.docx");

string[] addressFieldsExpect =
{
    "Company", "First Name", "Middle Name", "Last Name", "Suffix", "Address 1", "City", "State",
    "Country or Region", "Postal Code"
};

FieldAddressBlock addressBlockField = (FieldAddressBlock) doc.Range.Fields[0];
string[] addressBlockFieldNames = addressBlockField.GetFieldNames();

Voir également