For various reasons, I need to import HTML into a Word document. I display the HTML in Chrome, select the entire page, then paste it into Word. It works great, except for two problems I need help with.
First, if a word is surrounded by bold tags, when it is pasted into Word, it is accurately bolded, but it is surrounded now by non-breaking spaces, which sometimes make a small mess of the layout in Word.
For example, this page has two short sentences, each with a word bolded, one with <b> and the other with CSS:
If you load that page in Chrome, select all, and paste into Word, you'll see the non-breaking spaces surrounding the bolded words. Is there a way to prevent the non-breaking spaces? Or identify specifically the non-breaking spaces that were wrongly created like that? I know I could search/replace a non-breaking space with a regular space, but that would interfere with other places where I *want* non-breaking spaces.
If I show the html page in Internet Explorer and paste into Word, the problem does not exist, but for a multitude of reasons I need to use Chrome.
The other problem is that sometimes two words that are separate in the HTML will run together without a space in Word. It happens only infrequently, and always one of the words is bolded and the other is not bolded. In a 50-page document, this might happen 5 or 6 times.
I have only minimal skills in VBA, but I thought someone might be able to write a tiny program that would find instances where a non-bold character is immediately adjacent to a bold character. That would allow me to do a quick search and fix all of the instances rather than scouring the entire document visually.
Thanks in advance for anyl help on these issues.