I have a string with a number, looking like this:
"12345678-123"
I want to add a linefeed (the thing you get by pressing [SHIFT] + [ENTER]) before the dash "-".
It keeps adding a carriage return. This is my code:
sSomeString = Replace(sSomeString, "-", vbLf & Chr(30)) 'Chr(11) does not work ether - Chr(30) is the char for the dash, that does not break
ActiveDocument.Tables(iTableIndex).Cell(.Rows.Count, 4).Range.Text = sSomeString
I googled and so far it says everywhere to use ether vbLf or Chr(11). Any ideas?
// Problem solved:
My code didn't run correctly cause I was not using the Char(30), so Word created a Linebreak with the character "-"