ASPOSE home

com.aspose.words
Class Field

java.lang.Object
    extended by com.aspose.words.Field

public class Field
extends java.lang.Object

[The properties and methods of this class are subject to change.]

Represents a Microsoft Word field.

At the moment objects of this class are only returned by MergeFieldEventArgsBase.Field to allow using DocumentBuilder.moveToField(com.aspose.words.Field, boolean) to move to a merge field quickly in a custom mail merge event handler.

There will be more methods and properties added to the Field class later.


Property Getters/Setters Summary
FieldEndgetEnd()
           Gets the node that represents the field end.
java.lang.StringgetResult()
voidsetResult(java.lang.String value)
           Gets or sets text that is between field separator and field end.
FieldSeparatorgetSeparator()
           Gets the node that represents the field separator. Can be null.
FieldStartgetStart()
           Gets the node that represents the start of the field.
intgetType()
           Gets the Microsoft Word field type. The value of the property is FieldType integer constant.
 
Method Summary
java.lang.StringgetFieldCode()
           Returns text between field start and field separator (or field end if there is no separator).
voidremove()
           Removes the field from the document.
 

Property Getters/Setters Detail

getStart

public FieldStart getStart()
Gets the node that represents the start of the field.

getSeparator

public FieldSeparator getSeparator()
Gets the node that represents the field separator. Can be null.

getEnd

public FieldEnd getEnd()
Gets the node that represents the field end.

getType

public int getType()
Gets the Microsoft Word field type. The value of the property is FieldType integer constant.

getResult/setResult

public java.lang.String getResult()

public void setResult(java.lang.String value)
Gets or sets text that is between field separator and field end.

Method Detail

getFieldCode

public java.lang.String getFieldCode()
Returns text between field start and field separator (or field end if there is no separator).

remove

public void remove()
           throws java.lang.Exception
Removes the field from the document.

See Also:
          Wiki - the home page for the Aspose.Words Product Documentation that includes Programmer's Guide, Knowledge Base and other articles.
          Aspose.Words Support Forum - our preferred method of support.
          Aspose.Words Team - contact Aspose.Words Team.


ASPOSE home