VB script modification

Hi All,

I do have script only I just want to allign the message body . This script is VB script I want the message should be displayed effectively in users end. I am enclosing the script body. Please help me out.


 Sub SendEmailMessage(strDestEmail, strNoOfDays)
  WScript.echo "Sending Email to:" & strDestEmail
  Set objMessage = CreateObject("CDO.Message")
  objMessage.Subject = "Password Expires in " & strNoOfDays & " days"
  objMessage.From = strFromEmailAdd
  objMessage.To = strDestEmail
  objMessage.TextBody = "Your password expires in " & strNoOfDays & " days. Please change your password now using this link  https://webmail.elcaminohospital.org/iisadmpwd. The new password has to be:       * At least 8 characters and contain at least one uppercase letter, one lowercase letter, and one number or symbol.       * Passwords cannot contain the username or parts of the username that exceeds 2 characters.       * Passwords cannot be reused for 5 cycles. * Once reset a password cannot be changed for 7 days."


This entire above messages in "objMessage.TextBody"  is not diplaying one by one line. I just want to make this text body in an efficient manner. Like allignment should be proper any customization if needed please do & help me out.

Thanks & Regards,

Biplab
biplabmukherjeeAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

StealthyDevCommented:
Use VBCRLF to break a line.

If the e-mail is sent using HTML format, use <BR> to break line, you can add more effects like <LI> and <FONT> tags.
0
biplabmukherjeeAuthor Commented:
Thanks for your quick response, If you can add these switches & alter the text body that would be great. can you please do so for me.
0
StealthyDevCommented:
 objMessage.TextBody = "Your password expires in " & strNoOfDays & " days." & vbCrLf &"Please change your password now using this link  https://webmail.elcaminohospital.org/iisadmpwd." & vbCrLf &"The new password has to be:" & vbCrLf &"       * At least 8 characters and contain at least one uppercase letter, one lowercase letter, and one number or symbol." & vbCrLf &"       * Passwords cannot contain the username or parts of the username that exceeds 2 characters." & vbCrLf &"       * Passwords cannot be reused for 5 cycles." & vbCrLf &" * Once reset a password cannot be changed for 7 days."
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

StealthyDevCommented:
and, if your email content is an html doc, try this:


  objMessage.TextBody = "Your password expires in " & strNoOfDays & " days.<BR>Please change your password now using this link  https://webmail.elcaminohospital.org/iisadmpwd.<BR>The new password has to be:<BR><UL><LI>At least 8 characters and contain at least one uppercase letter, one lowercase letter, and one number or symbol.</LI><LI>Passwords cannot contain the username or parts of the username that exceeds 2 characters.</LI><LI>Passwords cannot be reused for 5 cycles.</LI><LI>Once reset a password cannot be changed for 7 days.</UL>" 

Open in new window

0
biplabmukherjeeAuthor Commented:
I am testing out right now. Will update you as soon as possible.

Thanks for all your support.
0
biplabmukherjeeAuthor Commented:
Excellent .
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.