Custom property on text nodes (Run)

Hello,

Is there a way to put custom properties on Runs? I mean some properties not visible when reading the document in MS-Word but stored internally.

I’d like to write something like:

Run run = new Run(doc);
run.setText("Hello");
run.setProperty("My comment", "This is just an example");
run.setProperty("A numeric value", 3);

After saving the document and loading it again through Aspose:

System.out.println(run.getProperty("My comment")); // Should print "This is just an example"
System.out.println(run.getProperty("A numeric value")); // Should print "3"

Just to give a bit of context about our needs:

  • We use Aspose Words to generate Word documents. Some text nodes in these documents must contain custom metadata.
  • These documents are then sent to lawyers to translate some parts in another languages (lawyers don’t want to see these metadata)
  • Then we import translated documents into an internal tool and we must be able to read metadata again.

My question seems similar to this topic but there were no answers.

Thanks and regards,
Brice

@bpoussin Unfortunately, there is no way to add metadata to Run nodes. This is not Aspose.Words restriction, this is MS Word document format restriction.