Replace, vbCrLf

S

Senad Isanovic

strDnr = "2828;1212;11;22;33;"
strDnr = Replace(strDnr, ";", vbCrLf)
ActiveDocument.Variables("bDnr") = strDnr & " "

Then from the document I use the field {DocVariable "bDnr"} to display the
value from the variable but the problem is that instead of showing new line
I can only see square which is not what I want. Later in the code I also
need to replace vbCrLf with ";"
 
C

Chuck

Use Chr(13) instead, thus:

strDnr = Replace(strDnr, ";", Chr(13))

Not sure why vbCrLf doesn't work but I've tested Chr(13) and it does.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top