i need a sub routine that will read a telephone number from AD and then modify the number by inserting spaces, brackets and dashes into the final output.
the final input is then used in our signature script.
script is working perfectly well i just need to make this small modification.
i think it would fairly simple to do but my vbs skills arent there yet... so im not really sure where to start and what commands i should be looking at.
so to sum things up
as you can see from this image, the phone number comes in the format +xxxxxxxxxxxx
i need this sub routine to modify the number into the following format
+xx (xx) xxxx-xxxx
once the sub has created this into a final output it will then be called by another Sub and entered into the section of the script that creates the signature.
the line in the script that will call on this is
SigFileStream.WriteLine " T " + g_objldapuser.telephoneNumber + " | " +" M " + g_objldapuser.mobile + " | " + " F +xx xxxxxxxx "
id like to replace g_objldapuser.telephoneNumber
with the final formatted output from the sub routine so it looks something like this.
SigFileStream.WriteLine " T " + sFormattedPhone + " | " +" M " + g_objldapuser.mobile + " | " + " F +xx xxxxxxxx
i hope this makes sense... does anybody have a script that does something like this?
or if you could guide me in the right direction that would be great..
please let me know if you need any more info.