I need to parse a name field into a more up-to-date format into a Prefix, firstname, and lastname. The information is currently in an ACCESS table with only ONE NAME FIELD having data as such.
Mr. Michael R. Smith
Dr. E Ralph
Ms. Edith Campbell
Col. Ronald McDonald
R. A. R. Front
I need it parsed into 3 different fields to show as follows:
"","R. A. R.","Front"
"","","The Company Name"
1) It needs to know what prefixes are Mr. Mrs. Miss Ms., Capt., Col., Rev., (this is the list)
2) It needs to include first and/or middle initials in the firstname field.
3) The company name usually has no spaces in it (thus the underscore) so the brackets need to be deleted (if they exist in the field) and the underscores replaced with spaces (I can do this part I think)
It's quite a bit of logic here.. Not sure how or where to start.
I am outputting it to a text file so that somebody else's program can bring it in.
Open "C:\temp\namelist.txt" For Output As #intnumfile
Do Until .EOF
I get lost at this point
At the end there are other parts of the file that I have already parsed and added to the line below:
Print #intnumfile, Chr$(34) & "3" & Chr$(34); "," & ----- etc, etc.