[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

VB script modification

Posted on 2010-04-08
6
Medium Priority
?
648 Views
Last Modified: 2013-12-25
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
0
Comment
Question by:biplabmukherjee
  • 3
  • 3
6 Comments
 
LVL 15

Expert Comment

by:StealthyDev
ID: 30106058
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
 

Author Comment

by:biplabmukherjee
ID: 30106199
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
 
LVL 15

Accepted Solution

by:
StealthyDev earned 2000 total points
ID: 30106504
 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
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 15

Expert Comment

by:StealthyDev
ID: 30106657
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
 

Author Comment

by:biplabmukherjee
ID: 30112073
I am testing out right now. Will update you as soon as possible.

Thanks for all your support.
0
 

Author Closing Comment

by:biplabmukherjee
ID: 31712241
Excellent .
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
With User Account Control (UAC) enabled in Windows 7, one needs to open an elevated Command Prompt in order to run scripts under administrative privileges. Although the elevated Command Prompt accomplishes the task, the question How to run as script…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

590 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question