deletepart not working?

I have a document with 2 image parts with rId1, rId2.

After mainDocumentPart.DeletePart(rId2), I see the image2 is gone, the entry to rid2 was removed from document.xml.rels under .res. So the imagepart rId2 is gone.

Problem: there is still an entry of rid2 inMainDocumentPart.

Question: Why does notMainDocumentPart.DeletePart(rId2) itself remove the entry rid2?

Or do I still have to parse the XmlDocument of theMainDocumentPart tomanully remove the rid2 entry?

Thanks!

Steve

[733 byte] By [stevemyu] at [2008-2-15]
# 1

Looks like I have to do it manually. Hope it will work out of CTP,

stevemyu at 2007-10-2 > top of Msdn Tech,Office Live Development,Microsoft SDK for Open XML Formats...