Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


VBScript escape sequences

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,298
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> VBScript escape sequences
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 VBScript escape sequences - 7/27/2001 1:38:25 PM   
  bdb

 

Posts: 3
Score: 0
Joined: 7/27/2001
From:
Status: offline
Greetings

anyone know what the escape sequence for " is in VBScript. The JavaScript/JScript equivalent is \".

Thanks
bdb
 
 
Post #: 1
 
 Re: VBScript escape sequences - 7/29/2001 9:02:43 AM   
  bdb

 

Posts: 3
Score: 0
Joined: 7/27/2001
From:
Status: offline
Turns out you can use Chr(34)
e.g. Response.Write("<TABLE WIDTH=" &Chr(34)& "300" &Chr(34)& ">")
will write
<TABLE WIDTH="300"> to the screen

all the best
bdb

(in reply to bdb)
 
 
Post #: 2
 
 RE: VBScript escape sequences - 7/2/2007 12:25:19 AM   
  kevinmortimer

 

Posts: 19
Score: 0
Joined: 8/15/2006
From: London
Status: offline
Hi

I have a similar problem and have tried the Char(34) option. Basicaly I am using a html to create the body of an email. All works fine with normal HTML but I am now trying to use Cascading style sheet code to keep the formating ( Bold colour ) of my text (  I pull the formatted text from by database already in CSS code). The CSS code uses quotation marks in its code. I have also tried using single quotes with no joy.

My vbs code works ok with both Char(34) and single quotation marks but in the body of my email I loose the formating. Is there another option to escape the quotation marks that will allow the formatting to be retained. Below is my code


Dim OutApp
Dim OutMail
Dim strbody
Dim SigString
Dim Signature
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = "sandra@sublime-solutions.co.uk"
.CC = ""
.BCC = ""
.Subject = "Attached CVs"
.HTMLBody = "<HTML><body><font size = 3 color = Black face = Verdana><SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;Chr(34) >Hi Derek<BR><BR></SPAN> <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;color: #0033FF;Chr(34) >Thank you</SPAN> <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;Chr(34) > very much </SPAN> <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;font-weight: bold;Chr(34) >for taking</SPAN> <SPAN STYLE= Chr(34)font-family: 'Verdana';font-size: 12px;Chr(34) > the time to interview <BR><BR><BR></SPAN> </FONT></BODY></HTML>"
.Display
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing

(in reply to bdb)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> VBScript escape sequences Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts