Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Open Email and Copy Data from form submitted online
#1
I have forms online that when submitted send the leads to my email inbox in outlook. I would like to be able to copy the data and export it to excel or another program easily. Here is an example of an email format:

First: John
Last: Smith
Phone: 555-555-5555
Email: [email protected]
Address: 123 Maple Street
City: Testville
State: CA
Zip: 55555

I would like to be able to extract the data ( John Smith, 555-555-5555, [email protected], etc...) into another program like excel or other software. How can i copy the data in the email?

I appreciate any help !

Thanks!
#2
Function Function4
Code:
Copy      Help
Dir d
str Data
foreach(d "$Desktop$\entries\*.eml" FE_Dir)
,str Entry=""
,str sPath=d.FileName(1)
,MailBee.Message m._create
,m.ImportFromFile(_s.expandpath(sPath))
,str body=m.BodyText
,body.trim
,for int'i 0 numlines(body)
,,str linetext.getl(body i)
,,str split=": "
,,_i=find(linetext split)+split.len
,,_s.get(linetext 0 _i)
,,sel _s
,,,case ["First: ","Last: ","Phone: ","Email: ","Address: ","City: ","State: ","Zip: "]
,,,Entry.addline(F"{_s.get(linetext _i)}")
,Entry.findreplace("[]" ",")
,Data.addline(Entry)
str CSVfile="$Desktop$\entries\Data.csv"
CSVfile.expandpath
Data.setfile(CSVfile)
run "EXCEL.EXE" F"''{CSVfile}''"
Not knowing exactly what format the .eml file is submitted by the form may cause problems.
#3
This macro transfers data from single message to Excel.

Macro Macro1468
Trigger F12     Help - how to add the trigger to the macro
Code:
Copy      Help
;Select the text in Outlook and run this macro.

spe 10

str s.getsel
ARRAY(str) a
int i
str rx=
;First: (.*)
;Last: (.*)
;Phone: (.*)
;Email: (.*)
;Address: (.*)
;City: (.*)
;State: (.*)
;Zip: (.*)
if(findrx(s rx 0 0 a)<0) mes- "data not found in the selected text" "" "x"

act "Excel"

for i 1 a.len
,a[i].trim
,a[i].setsel
,key R

key HD ;;next row

act "Outlook"


Forum Jump:


Users browsing this thread: 2 Guest(s)