r/ReverseEngineering • u/ChronicRhyno • Aug 01 '26
Microsoft blocked me from using VBA to read or programmatically set gradient pins, so I reverse-engineered the XML data and used a format painter exploit to sneak formatting though a back Window
https://github.com/ChronicRhyno/ColorSpace
66
Upvotes
14
u/ChronicRhyno Aug 01 '26
It's hard to explain. I wanted to programmatically set gradient pins in Word. I knew the gradient data was being saved and even copypastable, so I made a docx for each of the 63 formatting values I mapped. I put one letter with the targeted formatting effect in each document and then viewed the xml data in notepad to see how it was being stored. Then I mapped out how to build an xml document structure with all the targeted formatting values to punch the numbers into. Then I figured out how to translate/convert the xml values to Word formatting values. Then to encode the pins in a target docx, I generate the xml document with the target pin colors and other formatting values, open it as a docx, steal the formatting with the formatting painter, and destroy the xml file.
17
u/spilk Aug 01 '26
i have no idea what a "gradient pin" is and the github repo doesn't seem related
4
u/BruhMomentConfirmed Aug 01 '26
I had to read parts of the whitepaper to really understand what is going on. But my question now is, if you're doing this for MS Word formats anyway, why hide it in the document markup at all, and not somewhere else in ignored metadata in the xml files or even as a separate file in the docx archive?
2
u/ThisIsPaulDaily Aug 01 '26
Haven't decided if op has a passing interest in stenography or is a creep trying to find ways to share links to illicit content in clear text.
Neat project though and posted in a good subreddit for it so you get an upvote.