How to import an html file into MS word, and have Word recognize the H tags?

Anonymous
2019-02-02T01:31:48+00:00

When you bring a simple HTML file into MS Word, (e.g. with H1 and H2 tags) Word will import it.

But it doesn't seem to fully recognize the H tags as "MS Word "headings"

Anyone know how to fix this?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes
Answer accepted by question author
  1. Doug Robbins - MVP - Office Apps and Services 322.1K Reputation points MVP Volunteer Moderator
    2019-02-04T02:33:00+00:00

    If you open the HTML file in Google Docs and then, instead of copying and pasting into Word, you  go to File>Download as and select Microsoft Word (.docx) 

    and then open the downloaded document in Word, the appropriate Heading # styles will have been applied

    Less steps however if you simply paste the text with tags into Word and run the macro that I provided.

    1 person found this answer helpful.
    0 comments No comments

14 additional answers

Sort by: Most helpful
  1. Doug Robbins - MVP - Office Apps and Services 322.1K Reputation points MVP Volunteer Moderator
    2019-02-03T09:41:22+00:00

    The text at that link is the same as that which I had already copied and processed.

    0 comments No comments
  2. Anonymous
    2019-02-03T14:34:36+00:00

    yes,

    but the act of opening that text in Google Chrome, will "render it as HTML"

    From there, you can copy/paste -- from Google Chrome to MS Word.

    0 comments No comments
  3. Doug Robbins - MVP - Office Apps and Services 322.1K Reputation points MVP Volunteer Moderator
    2019-02-03T21:32:52+00:00

    But then you say that the Heading # styles have not been applied.

    Running the code that I gave you will assign the appropriate Heading # styles.

    0 comments No comments
  4. Anonymous
    2019-02-03T22:28:09+00:00
    0 comments No comments