wrap text into a string variable batch

Microsoft Windows xp home edition with s...
June 29, 2010 at 19:47:56
Specs: Windows XP
I am using a batch file to write a vbs email file. I am unable to create the text body of the email which includes the vbCRLF code. When the TextBody is written to the Target file, it has executed the first vbCRLF, and returns errors as it tries to execute the second vbCRLF and the last string. Enclosing it in double quotes doesn't work.

echo.TextBody = "Here is your file link." & vbCrLf & vbCrLf & "https:hereitis.com/file.pdf" & vbCrLf & "The link expires in 10 days.">>Target.txt

The vbCRLF are used to format a lengthy text body for the email.

Your help is appreciated.

See More: wrap text into a string variable batch

Report •

June 30, 2010 at 01:44:26
To echo a & symbol you have to prefix it with the caret char, i.e. ^& otherwise it has a special meaning for the command interpreter.

Report •

June 30, 2010 at 12:08:52
That worked! Thank you very much.

Report •
Related Solutions

Ask Question