
Select two lines, return as one line
Hi JasonM,
Don't forget to include some more info when posting:
Like:
MS Word, Off97, NT4
(or whatever)
Could make a difference ...
Getting back to your question:
Assumptions: Word2K and you've concatenated two lines into
variable 'OneLiner'; oneliner has this paragraph mark.Chr(13)
Dim sLeftPart As String
Dim sRightPart As String
Dim arrTemp
Dim MyNewLine As String
'determine parts left and right off paragraph mark, using Split function
arrTemp = Split(OneLiner, Chr(13), 2)
sLeftPart = arrTemp(0) 'left part off delimiter
sRightPart = arrTemp(1) 'right part off delimiter
'There you go
MyNewLine = sLeftPart & " " & sRightPart
Kind regards,
Perry
Quote:
> I want to set a variable based on a selection of two lines of text
separated
> by a paragraph mark, however the variable would be the line one and line
two
> concatentated (i.e., no paragraph mark).
> Any ideas?
> Much appreciated