Click here to Skip to main content
15,888,579 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have a word file:

paragraph1
paragraph2
paragraph3
paragraph4
paragraph5

I want to Join all lines of text into one:
paragraph1. paragraph2.paragraph3.paragraph4.paragraph5
Help me. Thanks all!!!

What I have tried:

C#
Word.Range rang = Globals.ThisAddIn.Application.ActiveDocument.Range();
rang = rang.Text.Replace("\n", " ");
Posted
Updated 15-Aug-18 23:49pm
v2
Comments
Richard MacCutchan 15-Aug-18 3:08am    
"But not ok."???
Richard MacCutchan 16-Aug-18 7:44am    
You have updated this post but still not provided an explanation of what the problem is.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900