Free Support Forum -

How to remove paragraph containing \r


Im doing search.replace method.
I have org. template with for ex: \r.
Now when i have empty content for i want to remove the hole line.

I have tried replace on “\r”, “”, that does not work.
I have tried node.remove(), but cant use cause the node does not have parrent.
How do i remove that perticcular paragraph with just a line break?



<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your request. Why don’t you use Mail Merge to fill your document with data? In case of using Mail Merge, you can use RemoveEmptyParagraphs option and empty paragraphs will be automatically removed.

Also, I think, Mail Merge is the better approach than “find & replace”. Please see the following link to learn more about Mail Merge:

Best regards.