Profile for User: Scott Beeson
You are here: Home1

This has bugged me forever!
Nevermind, I wasn’t thinking…
I added document.selection.SelectAll(); before your code and now it does what I was expecting (I’m using this for entire documents).
document.selection.Text = JSON.stringify(JSON.parse(document.selection.Text), null, ‘\t’);
I tried this macro and it just says “Syntax Error”. Are there prerequisites I’m missing?
For anyone else who finds this, if you copy and paste Stefan’s settings be sure you replace the HTML quotes with normal quotes!
This is the biggest feature I’m missing. I thought surely I just couldn’t find it. I constantly have to open Visual Studio or WebSense to reformat old blocks of code!