p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_codeclinic thread: VBA or not?

Message #1 by Aruna.Koya@e... on Tue, 11 Jun 2002 12:03:29 +0100
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

Content-Type: text/plain;

This can easily be achieved with vbscript or javascript.  I'm not sure why
you think you need a BAT file... if you want this to happen after clicking a
button in a web page, then do it in ASP, or if you want to have this as a
scheduled batch process save it as a VBS or JS file and run it through
windows script host.
1. Use filesystemobject to open your file 
2. read it line by line
3. split each line on the comma (using the split() function)
4. identify the array element which corresponds to your email address and
extract it
5. split the value on @
6. split the first element on . to extract your names
7. split the second element on . to extract your company

-----Original Message-----
From: Aruna.Koya@e... [mailto:Aruna.Koya@e...]
Sent: 11 June 2002 12:03
To: Code Clinic
Subject: [proasp_codeclinic] VBA or not?

I have a csv file which has an email address in it and some other fields.
The email address is in the following format
"firstname.surname@c..."  I need to extract the firstname, surname
and company parts of the email and put them in different fields.  This all
has to be automated.  I can do it manually in Excel, but I need to do it
automatically after firing off a bat file from a web page.

I am guessing vba is the way to go - but I don't even know where to start. 

Does anyone have any ideas? 

Thanks in advance. 

This message may contain privileged or confidential information. 
If you receive this message in error please return it to the sender and
delete all copies - thankyou.
--- Change your mail options at http://p2p.wrox.com/manager.asp or to
unsubscribe send a blank email to

Scottish Enterprise Network

Headquarters Address & Contact Numbers

150 Broomielaw
5 Atlantic Quay
G2 8LU.
Tel:  +44 (0) 141 248 2700.
Fax:  +44 (0)141 221 3217

 This message is sent in confidence for the addressee only.
It may contain legally privileged information. The contents are not to
be disclosed to anyone other than the addressee. Unauthorised recipients
are requested to preserve this confidentiality and to advise the sender
immediately of any error in transmission.

  Return to Index