Hi
Thanks for your request. Every form field in the document is marked by bookmark. So you can use DocumentBuilder to navigate in the document. You can also use Documentbuilder to insert RTL and LTR text into the form field. For example try using the following code:
Document doc = new Document(@"Test168\in.doc");
DocumentBuilder builder = new DocumentBuilder(doc);
//Get formfield from document
FormField myFormField = doc.Range.FormFields["myFormField"];
myFormField.Result = string.Empty;
//Move cursor of DocumentBuilder to bookmark that marks Formfield
builder.MoveToBookmark(myFormField.Name, true, true);
//Search for the FieldEnd Node
Node currentNode = builder.CurrentNode;
while (currentNode.NodeType != NodeType.FieldEnd)
{
currentNode = currentNode.NextSibling;
}
//Move cursor to the end of field
builder.MoveTo(currentNode);
//Insert left to Right text
builder.Write("test");
//insert right to left text
builder.Font.Bidi = true;
builder.Font.LocaleIdBi = 1025;
builder.Write("مرحبًا");
//Save document
doc.Save(@"Test168\out.doc");
I hope this could help you.
Best regards.
Alexey Noskov
Developer/Technical Support
Aspose Auckland Team