N
N
Nicholas Kim2014-12-17 10:32:48
HTML
Nicholas Kim, 2014-12-17 10:32:48

How to insert HTML into Word?

Good afternoon! I decided to make my life a little easier when preparing various documentation in Microsoft Word - to make a button for processing a selected block of text using Typographer , a web service for text formatting.
The problem is that the result of the call is HTML code, with entities like &nbsp;and tags <p>, <br />.
Is there a way to insert such code instead of the selected block (Selection) in Word from VBA code?
Upd: The problem was solved by itself :-)
Full macro code in GitHub Gist.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
Nicholas Kim, 2014-12-17
@Yaruson

Selection.PasteAndFormat wdFormatOriginalFormatting

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question