Dim imgres as New rtdImageResource (ndb, "newtest")
imgres.save ' the resource document is created, but in order to save changes from ImportFromFile we need to save in order to store image to disk
ctxDump.getRichTextItem doc, "Body"
ctxDump.add imgres.Image ' add the image we just imported, not the resource
' in order to add the newly created image resource itself
Dim img as New rtGraphic("")
img.ResourceName = "newtest" ' now we reference the newly created resource
ctxDump.add img ' the new image resource will not be visible until we re-open the database