I have VBA code that has the following line of code:
Code:
SRCdoc.Paragraphs(iPara).Range.Text = _
Replace(SRCdoc.Paragraphs(iPara).Range.Text, ",", " ", 1, , vbTextCompare)
My question is why this line of code causes the paragraph to inherit the style of the FOLLOWING paragraph.
The particular case I am currently investigating is one in which there are no commas in the paragraph, so the REPLACE statement should not change the paragraph, yet, it always inherits the style of the subsequent paragraph. This happens when the following paragraph is a custom style and when it is the default 'normal' style.
Help would be much appreciated.