I am working on Word web addin OfficeJS, I wanna change my underline color to red. Is it possible to change the color of underline without affecting the font color ? Attached my code below:
Word.run(function (context) {
var searchResults = context.document.body.search(searchResult, { ignorePunct: true });
context.load(searchResults, 'font');
return context.sync().then(function () {
for (var i = 0; i < searchResults.items.length; i++) {
searchResults.items[i].font.color = 'red';
searchResults.items[i].font.underline = 'wave';
}
return context.sync();
});
})