Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
To Remove Field using Aspose.Words Java for Jython. Here you can see sample code.
Jython Code
from aspose-words import Settings
from com.aspose.words import Document
class RemoveField:
def __init__(self):
dataDir = Settings.dataDir + 'programming_documents/'
doc = Document(dataDir + "RemoveField.doc")
field = doc.getRange().getFields().get(0)
# Calling this method completely removes the field from the document.
field.remove()
doc.save(dataDir + "RemoveField Out.docx")
print "Field removed from the document successfully."
if __name__ == '__main__':
RemoveField()
Download running code from any of the below mentioned social coding sites:
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.