I have a Vba routine wherein I need to remove the carriage return (vbCR, Chr(13), or ^p) from the end of every other paragraph and replace it with a tab (vbTab, Chr(9), or ^t) character. I set it up to count the paragraphs in the document and then cycle through the count with the variable updating each time by two, so that part works fine. What isn't working is when I replace the carriage return with a a tab character, it comes right back and now I just have an extra tab at the end of every other paragraph. Here's the section of code I'm working with:
Dim PGe As Integer
Dim ptext As String
Dim pmodtext As String
PGe = ActiveDocument.Paragraphs.Count
For k = 2 To PGe
Options.ReplaceSelection = True
ptext = ActiveDocument.Paragraphs(k).Range.Text
pmodtext = Replace(ptext, Chr(13), Chr(9))
ActiveDocument.Range(ActiveDocument.Paragraphs(k).Range.Start, ActiveDocument.Paragraphs(k).Range.End).Select
Selection.TypeText (pmodtext)
k = k + 1
Next k