79261507

Date: 2024-12-07 22:19:40
Score: 1
Natty:
Report link

I looked at the documentation, and the way to make an analogous function to 'insertAfter' except for XML is as follows:

Sub InsertXMLAfter(ByRef newDoc As Document, ByRef strXML As String)
  Dim rng As Range
  Set rng = newDoc.Content
  rng.Collapse Direction:=wdCollapseEnd
  rng.InsertXML strXML
End Sub
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Mark Springer