J
John
Hi there,
Can anyone help me with a weird string problem? Basically the vbCr, in the
middle of the code snippet below, seems to be ignored when you add the text
at the end to a text file, but appears to work ok when using Debug.Print.
Is there something about the text conversion process that ignores carriage
returns?
Many thanks
John
For Each myRun In shp.TextFrame.TextRange.Runs
If myRun.Font.Name = "Arial" Then
hdrsCol.Add (myRun)
..........................
For Each myRun In hdrsCol
sContentsText = sContentsText & vbCr & CStr(myRun)
Debug.Print sContentsText
Next myRun
..........................
'Open new text file and add text
FileNum = FreeFile
Open sTextFileName For Output As FileNum
Print #FileNum, sContentsText
Close FileNum
..........................
Can anyone help me with a weird string problem? Basically the vbCr, in the
middle of the code snippet below, seems to be ignored when you add the text
at the end to a text file, but appears to work ok when using Debug.Print.
Is there something about the text conversion process that ignores carriage
returns?
Many thanks
John
For Each myRun In shp.TextFrame.TextRange.Runs
If myRun.Font.Name = "Arial" Then
hdrsCol.Add (myRun)
..........................
For Each myRun In hdrsCol
sContentsText = sContentsText & vbCr & CStr(myRun)
Debug.Print sContentsText
Next myRun
..........................
'Open new text file and add text
FileNum = FreeFile
Open sTextFileName For Output As FileNum
Print #FileNum, sContentsText
Close FileNum
..........................