I want to customize the "Heading1" and "Heading2" styles programatically using Ooxml
via office.js
library in visual studio code. I have searched through google and many documentations but don't still get anything in that line. Is it possible to achieve this the way I want to? What are the available options if I can't get it done the way I am intending to.
Thanks.
No, it's unfortunately not possible to modify built-in / existing styles using Office-JS.
It is possible to change these styles on the closed document, using a library such as the Open XML SDK.
You might want to add your vote(s) to the suggestion to allow changing styles, numbered list definitions, etc. On UserVoice, where the topic is "under review".