Welcome to DirectSmile

How do you format a phone number with VB Script

link this post written on 11/08/2015
  • To top


I am brand new to DSF and Direct Smile and I dont know how to write either VB Script OR Javascript.

I need a way to format a phone number to (000) 000-0000... I dont understand how to write vb script nor can i seem to find the correct information on the internet.. Whenever i find something that i think will work... i paste it into my variable script section and it gives me a syntax error.. I do not know what im doing wrong. I also dont understand how you account for how the customer types in the information.. I cant seem to find a character limit.. or any way to give the customer an example of what they need to write in. So it seems like they could type in 10 digits.. or they could add the parenthesis themselves or the space or the dash or anything they want for that matter... So how do i write the script for all of that?

ALSO is there any kind of VB Script rule list? or something? So i dont have to go thorugh this search and find everytime i need to write some new rule or something?

Any help is appreciated because i dont know what im doing.




link this post written on 12/08/2015
  • To top



I'm in the same boot as you. I look forward to seeing what they say. I find this software very frustrating.

link this post written on 12/08/2015
  • To top

Hello Kristen and Macdevin,

Thank you for your questions and the detailed description. I can understand that starting with a new software is frustrating at the beginning. Let me try to shed some light on your questions.

One of my colleagues wrote a couple of scripts, please find a script for phone numbers here:

Another FAQ is how to use a script for vertical alignment:

Here you can download two PDFs that show the scripts which can be used in DirectSmile documents:

In case you could not find the answer to your questions in our forum, please feel free to contact our support team.

Kind regards,

tagsTags: VB Script
  • Statistics: 3 Posts | 17 Visits
created by mixxt
  • v1.1.1
  • (highfive)