Answer the question
In order to leave comments, you need to log in
How to insert arbitrary HTML code inside Word using VBA macro?
I rummaged through everything in the documentation , found only many examples of inserting text, but not html code with formatting.
Can anyone suggest a solution? I'm sure it's there, I just don't know what to look for
Sub NewDivision()
With ActiveDocument.HTMLDivisions
.Add
.Item(Index:=1).Range.Text = "<b>Привет, мир!</b>"
End With
End Sub
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question