Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Ruby Code
## The path to the documents directory.
data_dir = File.dirname(File.dirname(File.dirname(__FILE__))) + '/data/'
\# Open the document.
doc = Rjb::import('com.aspose.words.Document').new(data_dir + "Field.RemoveField.doc")
#ExStart
#ExFor:Field.Remove
#ExId:DocumentBuilder_RemoveField
### a field from the document.
field = doc.getRange().getFields().get(0)
\# Calling this method completely removes the field from the document.
field.remove()
#ExEnd
\# Save the document.
doc.save(data_dir + "Field.RemoveField Out.doc")
Download Remove Field (Aspose.Words) 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.