Why DoubleStrikeThrough cannot be used for Insertion revisions
RevisionTextEffect describes how the revision itself is displayed (the markup that Word shows in the margin or as a visual cue).
According to the OOXML specification the visual effects that can be applied to Insertion revisions are limited to:
Underline
Italic
Bold
None
DoubleStrikeThrough is defined only for the following revision types:
DeletedTextEffect
RevisedPropertiesEffect
MovedFromTextEffect
Hence Aspose.Words follows the OOXML standard and throws the validation message:
DoubleStrikeThrough value can only be set for DeletedTextEffect,
RevisedPropertiesEffect or MovedFromTextEffect properties
Microsoft Word’s UI can show a double‑strike on an inserted revision, but internally it stores that as a character formatting change on the inserted runs, not as a revision‑level effect. Therefore the effect cannot be set via the RevisionTextEffect property.
How to achieve a double‑strike appearance for an insertion
If you need the inserted text to appear with a double‑strike, apply character formatting to the runs that belong to the insertion revision:
// Load the document
Document doc = new Document("Input.docx");
// Iterate over all revisions
foreach (Revision rev in doc.Revisions)
{
// Work only with insertions
if (rev.RevisionType == RevisionType.Insertion)
{
// The revision node is a Run (or a collection of Runs)
Node node = rev.Node;
// If it's a Run we can directly set the font property
if (node is Run run)
{
run.Font.DoubleStrikeThrough = true;
}
// If it's a composite node (e.g., a Paragraph) apply recursively
else
{
foreach (Run childRun in node.GetChildNodes(NodeType.Run, true))
{
childRun.Font.DoubleStrikeThrough = true;
}
}
}
}
// Save the result
doc.Save("Output.docx");
What this does
The revision remains an insertion (so Word will still track it as a change).
The visual appearance of the inserted text shows a double‑strike because the DoubleStrikeThrough character format is applied.
No exception is thrown because we are not trying to set RevisionTextEffect.
RevisionTextEffect.DoubleStrikeThrough is not supported for insertion revisions by design (it is not part of the OOXML spec).
To display a double‑strike on inserted text, apply the DoubleStrikeThrough font property to the runs that belong to the insertion revision, as shown in the code snippet above.
If you have any further questions or need assistance adjusting the code for a specific document structure, feel free to let us know!
I don’t think that’s correct, the Double Strikethrough value along with the other styles from the setting are stored in the Data/Options registry setting with an offset on 330 and has a value of 10. (none = 0, Bold = 2 etc).
The Double Strikethrough format is not stored in the OOxml and not sent with the document
@GaryO It looks like a bug.
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): WORDSNET-28608
You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.