Perhaps something like the following will work for you.
str[1] = "The quick brown fox jumped over the lazy dog";
str[2] = "Grumpy wizards make a toxic brew for the jovial queen";
str[3] = "The five boxing wizards jumped quickly";
text = Normal[SparseArray[{1 -> str[1], 2 -> str[2], 5 -> str[3]}]] /. {0 -> ""}
Export[FileNameJoin[{HomeDirectory[], "Desktop", "test.txt"}], text]
The contents of test.txt will look like this:
The quick brown fox jumped over the lazy dog
Grumpy wizards make a toxic brew for the jovial queen
The five boxing wizards jumped quickly
Edit
If the strings are indexed by line number, as Yves Klett suggests, then this very simple code will suffice:
str[1] = "line 1"; str[2] = "line 2"; str[5] = "line 5";
text = Table[str[i], {i, 5}] /. str[_] -> ""
Mr.Wizard has come up with an even more concise variant of the above.
str[_] = ""; text = Array[str, 5]
Another edit
Mr.Wizard has also supplied a neat variant of my original SparseArray
solution.
Normal @ SparseArray[{1 -> str[1], 2 -> str[2], 5 -> str[3]}, Automatic, ""]
Export["test.txt",{str1, str2, str3}]
. $\endgroup$ – b.gates.you.know.what Sep 15 '13 at 0:04{str1,"","",str2}
will make the line depth of str2 be 4. If you say how you intend to indicate on what line a string should appear, such a list could be generated programmatically. $\endgroup$ – C. E. Sep 15 '13 at 0:22