java.lang.Objectcom.aspose.words.FieldOptions
public class FieldOptions
Example:
// Set the culture used during field update to the culture used by the field.
doc.getFieldOptions().setFieldUpdateCultureSource(FieldUpdateCultureSource.FIELD_CODE);
doc.getMailMerge().execute(new String[] { "Date2" }, new Object[] { new SimpleDateFormat("yyyy/MM/DD").parse("2011/01/01") });
Property Getters/Setters Summary | ||
---|---|---|
int | getFieldUpdateCultureSource() | |
void | setFieldUpdateCultureSource(int value) | |
Specifies what culture to use to format the field result. The value of the property is FieldUpdateCultureSource integer constant. |
Property Getters/Setters Detail |
---|
getFieldUpdateCultureSource/setFieldUpdateCultureSource | |
public int getFieldUpdateCultureSource() / public void setFieldUpdateCultureSource(int value) |
By default, the culture of the current thread is used.
The setting affects only date/time fields with \\@ format switch.
Example:
Shows how to specify where the locale for date formatting during field update and mail merge is chosen from.// Set the culture used during field update to the culture used by the field. doc.getFieldOptions().setFieldUpdateCultureSource(FieldUpdateCultureSource.FIELD_CODE); doc.getMailMerge().execute(new String[] { "Date2" }, new Object[] { new SimpleDateFormat("yyyy/MM/DD").parse("2011/01/01") });