I'm trying to replace text in a rtf file with:
System.IO.File.WriteAllText(sTarget, System.IO.File.ReadAllText(sTarget).Replace("||MyCompanyData||", MyCoText))
For some reason, it won't work. I'm doing the same thing a few lines above that with this:
System.IO.File.WriteAllText(sTarget, System.IO.File.ReadAllText(sTarget).Replace("||ProjectOverview||", txtProjectOverview.Text))
That one works fine and without fail. I even tried to replace MyCoText with txtProjectOverview.Text just to see if it was something with the string variable but it still doesn't work.
It seems so easy but I still don't see what I'm doing wrong.