Delete an altChunk

Home Forums WordprocessingML Delete an altChunk


This topic contains 0 replies, has 1 voice, and was last updated by  NehaS 7 months, 3 weeks ago.

Viewing 1 post (of 1 total)
  • Author
  • #3938


    Hi Eric,

    I inserted an altChunk after a specific SDT(content control) in a document using the the same method as described in the link ” ” ( “Using V2 of the Open XML SDK” ). I want to delete the altChunk when I edit the document. This part I’m doing as follows –

    catch (ArgumentOutOfRangeException e)
    { /*catch ArgumentOutOfRangeException which is thrown when the part with the specified id does not exist*/ }

    But the approach doesn’y seem to work out. Everytime I edit the document, the altChunk is not deleted. Instead a new altChunk with the same id gets added. The first time I create a document, the XML looks like this –

    After I edit the document, the XML is –

    So every time I edit the document, a new altChunk is added every time. Can you please help me with it and let me know where I’m going wrong.


Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.