Forum Moderators: phranque

Message Too Old, No Replies

Web Form to Outlook

Parsing Text to database

         

Mardi_Gras

7:21 pm on Nov 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I would like to take the results of my contact form and parse it into an Outlook address book - or any address book, for that matter. I tried CaTrap but had some problems setting up the custom fields in Outlook.

Any suggestions? I need to have a better way to store and utilize this data than seaching through e-mails!

sun818

7:28 pm on Nov 11, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



msgparse from cypressnet is a windows app that can parse out e-mail data into a CSV or ODBC.

Another way would be to have the form processing script append to a CSV file on the web server that you can import into Outlook later.

Mardi_Gras

4:00 am on Nov 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, I can use msgparse to parse my data into a database (seems to work pretty well - good suggestion, sun818). But then I need to get that data from the database - either a .txt or .mdb file - into Outlook (ideally, into a custom form in Outlook, which Outlook's built-in importer won't handle). So what's the next step? ContactGenie? Any other suggestions?

sun818

4:21 am on Nov 12, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I suggest saving your msgParse as CSV. In Outlook 2000 try:

  • File, Import & Export...
  • Import from another program or file...
  • Click Next...
  • Select Comma Separate Values...

    Or if you want pretty instructions, get lucky with this search term:
    Importing An Address Book Into Outlook 2000

  • Mardi_Gras

    4:29 am on Nov 12, 2002 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Actually, I was saving it as a csv file - I must be on the right track!

    Unfortunately, I have a couple of custom fields (Arrival Date and Departure Date) that I can't readily drop into an available Outlook field. Outlook's built-in importer won't map to custom form fields. :( That's why I'm looking for a custom import solution.

    I could just put the Arrival Date and Departure Date in the notes field (that would work fine for my purposes) but I can't find a way to map both database fields to a single Outlook field, and for the sake of a simple form I need those two values to be entered separately.

    Mardi_Gras

    4:52 am on Nov 12, 2002 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Actually, that's why CaTrap would not work for me - the program worked fine with the standard Outlook contact template, it was the difficulty of mapping fields to custom Outlook forms that caused problems...

    sun818

    5:47 am on Nov 12, 2002 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



    Hi MG, I have not used msgParse in a very long time so I forget what your options are. Anyway... If you want to import two fields into one custom field (I assume User Field 1,2,3,4) some pre-processing will be necessary. For example, if you have this in your CSV file:

    "11/11/2002","11/13/2002"

    you would need to remove the "," part:
    "11/11/2002 11/13/2002"

    That will allow you to import the two dates into one field. Sticky me if you are having additional issues or want me to take a look at the import file.

    Mardi_Gras

    1:19 pm on Nov 12, 2002 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    That's a good point - if I just get them into Excel properly I can then combine the two fields in Excel. I can at least handle all of my existing leads that way - maybe I can do some work on the contact form to make it simpler in the future.

    I am also trying out a couple of programs that will semi-automate the import to Outlook (using Outlook's built in converters, I have to map the fields every time I import). ContactGenie claims to both remember mapping settings for a particular database and also to also overcome the problem with importing into custom forms in Outlook.

    I always like to have more than one option, though, so if you can think of any other ways to simply get the data from my .csv file into Outlook (since I will be doing this every day) I would appreciate the input.

    Thanks for all of your help!

    aspdaddy

    11:24 pm on Nov 12, 2002 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Have you tried doing this in outlook VBA?

    In theory it should be possible - Run a script in ThisOutlookSession::Application_NewMail() check the subject of the mail, if it applies create an instance of your custom form and set the properties by parsing the bodytext of the new mail item.

    Let me know if it works, I could use a similar solution myself :)

    Mardi_Gras

    11:45 pm on Nov 12, 2002 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Let me know if it works, I could use a similar solution myself

    I've got a better idea - you write the script, and let me know if it works :) You will note my nickname has no references to code ;)

    Actually, I'm still working with CaTrap, which should do exactly what I want from within Outlook (it is an add-in) - the author sent some helpful material to me that might get me back on track.

    I guess the problem will be that I want the data in Outlook to make contact management easy, and I want it in a database to make bulk e-mailing (or mailing) easy. I did see one solution that let Outlook use an access database (rather than a .pst file) as the source for contacts - that would really simplify things. It was not inexpensive for more than 3,000 records, however - that was the drawback. So I did not even try it out.

    andreasfriedrich

    12:22 am on Nov 13, 2002 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Have your script produce vCard [imc.org] compliant output. They can be imported into most address books.

    Andreas

    Mardi_Gras

    2:09 pm on Nov 13, 2002 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    I started working with CaTrap again and it works perfectly to import all standard fields from my mail form into Outlook (it runs as part of the rules wizard). I need to work with it on the custom fields; that's my task for today. I am not an expert at Outlook forms, so that may take a little time.

    Interesting note - it seems that CaTrap will also let me export to a database file by setting up another rule in the Outlook rules wizard. So if that works, I could get a new inquiry form, automatically parse all of the relevant data into Outlook, then (again without any user intervention) export to a database file. I really like the "no user intervention required" part of this scenario.

    My reason for wanting the database file is flexibility if I later want to do mail merge or e-mail merge to my contacts. I don't think Outlook is a suitable vehicle for either :(

    I'll post later if I get this all working as planned.

    Now I just need to implement this for some of my clients so I can bill out the time I've spent figuring all of this out :)

    Mardi_Gras

    3:55 am on Nov 14, 2002 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Well, despite my earlier problems, CaTrap now seems to be the perfect solution for parsing the mail form data into Outlook. I set up a custom contact form tonight (with my extra data fields), set it as the default for new contacts, mapped CaTrap to the right fields, and presto! Works like a charm. Just runs as part of the rules wizard, and contacts are automatically, seamlessly added as new mail arrives. I am really impressed.

    Now I want to get the database export feature of CaTrap working at the same time. I am almost there - I'm just having some trouble with fields where customers are putting commas and messing up my de-limiting. Perhaps a switch to tab-delimited (rather than.csv files) might do the trick. But its getting late!

    aspdaddy

    6:31 pm on Nov 14, 2002 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    MG - I wrote this script if you are interested,

    Well worth the effort, it is a very, very usefull feature for Outlook - no more online db's for my web enquiries juast good ol plain text email. Thanks for the inspiration to get off my a** and do it :)

    The parsing just just needs the email to be plain text like this:
    first=john
    last=smith
    email=johnsmith@hotmail.com
    Referrer=google
    k1=cheap
    k2=widget

    is read by outlook like this:

    myCustomContactItem.UserProperties("Referrer") = parse( "Referrer", myWebEnquiry.Body )

    So why do you want to export them now to a database?

    Mardi_Gras

    7:14 pm on Nov 14, 2002 (gmt 0)

    WebmasterWorld Senior Member 10+ Year Member



    Glad I could provide inspiration ;)

    As to also exporting to a database, I'm just being greedy - I could then use the database for managing e-mail (newsletters, etc.) and direct mail.

    Thanks for the script - I may sticky you for advice on implementing it.