Am working on an applciation which is already having a functionality where in they are using word templates to generate letters.
My responsibility is to insert couple pf more elements in the header section.
I tried creating these elements(textbox) in the header. The using content control kit I gave XPath values. When I am trying to generate the letters the below line of code fails
Dim pkgdata As PackagePart = TemplatePackage.CreatePart(uriData, "application/xml")
The exception comes is "Cannot add part for the specified URI because it is already in the package."
My data already contains the XML tag for the new element had added.
Could any one please help me to resolve this problem?