Insert formatted text at a bookmark

Andrew P. outlines in Andrew Macro Listing 7.8 a way to insert text at a bookmark:

oBookMark.getAnchor.setString("What you want to insert")```

Is there an easy way to do this and apply formatting to the inserted text?  (Specifically, I want it italicized.)

Apologies for the way that code block is displaying. As you can see, I used the triple-backtick to close it, but the site won’t close it there. And for some reason, the first line of the block,
oBookMark = oDoc.getBookmarks().getByName("<yourBookmarkName>")
Is missing.

I just found a way to make what I wanted happen without actually answering my question. In the document, I simply put the formatting in place right at the bookmark, and the text my macro dropped in was formatted that way.