Script to remove selected change bar
I'm looking for a way to remove a single change bar from the document using a script.
I can do this manually, using Esc c h - Format>Style>Change Bar.
Usually, I have to do this twice - partly b/c I'm not sure what text set the change bar initially, so I select beyond the text with the change bar, run the command (which sets the text as change bar text), and then run the command again (which removes the new and the original change bars.)
Per the documentation:
Fcodes ([FCodes.TXT_CHANGEBAR]);should work, but it doesn't seem to. I thought I would have to run it twice, but it doesn't even create the change bar if I run it once.
Fcodes ([FCodes.TXT_BOLD]); does work so the syntax is correct.
Am I doing something wrong, or is there a better way to do this?
I haven't tried yet, but I might be able to ADD a change bar via script by turning on automatic change bars, adding a space, removing the added space, and turning automatic change bars back off.
The bigger issue is removing the change bars. If it can't be done, is there a way to script the Format>Style Drop-down being selected?
In case anyone needs it, I found out I can turn on and off automatic change bars with:
doc.AutoChangeBars=1 or doc.AutoChangeBars=0
and I can remove ALL change bars with:
doc.ClearAllChangebars();
