Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

216
Views
Bold Hebrew text in Microsoft Office Add-ins dosn't work

I try build some Office Add-in app to Highlight words in my text. I wrote this code but it does not bold Hebrew words, only English words. Any idea why?

Office.onReady((info) => {
  if (info.host === Office.HostType.Word) {
    document.getElementById("sideload-msg").style.display = "none";
    document.getElementById("app-body").style.display = "flex";
    document.getElementById("run").onclick = run;
  }
});

async function highlightWord(word, context) {
  var searchResults = context.document.body.search(word, { matchSuffix: true });
  context.load(searchResults, "font");
  await context.sync();
  for (var i = 0; i < searchResults.items.length; i++) {
    searchResults.items[i].font.color = "black";
    searchResults.items[i].font.bold = true;//This line doesn't work with Hebrew.
    searchResults.items[i].font.highlightColor = "yellow";
  }
  await context.sync();
}

export async function run() {
  return Word.run(async (context) => {
    var wordsArea = document.getElementById("wordsArea").value;
    var words = wordsArea.split(" ");
    for (var i = 0; i < words.length; i++) {
      await highlightWord(words[i], context);
    }
    await context.sync();
  });
}
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!