Hi Customer,
Thank you for your update.
On further analyzing your given template Word document, we have found that the Word document has some custom defined tab stop positions. Hence after replacing the placeholders with text, the text will be positioned based on the custom tab stops defined in the corresponding paragraph in the Word document. It is an actual behavior of Microsoft Word document and DocIO also doing the same. So, we have modified your given input template Word document by removing the unnecessary tab stop positions in the Word document. Please find the modified input Word document from the following link and code snippet to replace the placeholder text using DocIO from below:
Modified Word document:
http://www.syncfusion.com/downloads/support/forum/123789/ze/template_Modified-1943144393.zipCode Snippet:
//Load the template document using DocIO
WordDocument document = new WordDocument(@"F:\Issue Samples\Incidents\123789 - Convert xml to Word the xml has absolute positions\template_Modified.docx", FormatType.Docx);
//Replace the placeholder text
document.Replace("${kundennummer}", "xxx", false, false);
document.Replace("${vertragsNr}", "xxx", false, false);
document.Replace("${gueltigVonTag}", "xxx", false, false);
document.Replace("${gueltigVonMonat}", "xxx", false, false);
document.Replace("${gueltigVonJahr}", "xxx", false, false);
document.Replace("${gueltigBisTag}", "xxx", false, false);
document.Replace("${gueltigBisMonat}", "xxx", false, false);
document.Replace("${gueltigBisJahr}", "xxx", false, false);
document.Replace("${versicherungsscheinNr}", "xxx", false, false);
document.Replace("${kennzeichen}", "xxx", false, false);
document.Replace("${fahrzeugart}", "xxx", false, false);
document.Replace("${fabrikat}", "xxx", false, false);
//Saves the document in the given name and format
document.Save("Replace.docx", FormatType.Docx);
//Releases the resources occupied by WordDocument instance
document.Close();
If we misunderstood any of your requirement then kindly elaborate the actual requirement with detailed description. Thereby we will analyse further on the mentioned case and will provided you appropriate solution.
Regards,
Sarath