Hi,
I have a requirement in my MVC application where I want to read predefined Word document template(docx file) and replace placeholders in that template with some text or images. I am able to replace placeholders with normal text value using Regex. I am even able to replace standalone placeholders with images by inserting ImagePart and Drawing object to the document at placeholder location. But I am facing issue for image replacement when the placeholder is enclosed/inside a paragraph text.
For Example, below is one of the paragraph I have in the template document:
“The searches conducted on the open public domain revealed that Cloud9 has its own official website as Website. The website of the company reveals that the company is “As per website……” The screenshot of the website has been shown below: {InternetScreenShot01} On further searches into product categories and we found {Status} brand / mark products was mentioned on the website. The screenshot of the search results showing the {Status} brand / mark products has been shown below: {InternetScreenShot02}”
Here there are two placeholders in this para {InternetScreenShot01}, {InternetScreenShot02} which should get replaced by an image keeping rest of the para text as it is.
Can anyone please suggest me how to achieve this? Its critical for me as my report generation module delivery is halted because of this
Thanks in advance