damienm
asked on
address recognition software
Hi All,
I am wondering does anyone know of any software dll which can be downloaded (preferably free) which can be used in a program to find UK addresses where the postcode is given.
Thanks
Damien
I am wondering does anyone know of any software dll which can be downloaded (preferably free) which can be used in a program to find UK addresses where the postcode is given.
Thanks
Damien
You won't get this info for free I am afraid. The Royal Mail will sell you this info or you can get it from their website http://pol.royalmail.com/AF.asp I guess you could use the webbrowser control and navigate to this and take out the information returned for your own use.
Presumably from a bitmap/image?
Is the source typed or hand-written?
I have seen some software that scans a business cards and then extracts the name, address & telephone & fax But it does not work on Scandinavian, Greek & Russian names & addresses.
Is the source typed or hand-written?
I have seen some software that scans a business cards and then extracts the name, address & telephone & fax But it does not work on Scandinavian, Greek & Russian names & addresses.
ASKER
inthedark,
No it is just typed. It is just to save time/mistakes when people are typing addresses. They only need to enter postcode.
Tim Cottee,
I might be able to use your example using something like Wininet API to get access to the web and read the results that come back, but I suspect it will be quite slow accessing the web and returning the correct part of html string.
Also deighton QAS is an interesting site with some good products.
No it is just typed. It is just to save time/mistakes when people are typing addresses. They only need to enter postcode.
Tim Cottee,
I might be able to use your example using something like Wininet API to get access to the web and read the results that come back, but I suspect it will be quite slow accessing the web and returning the correct part of html string.
Also deighton QAS is an interesting site with some good products.
damienm, here is a very quick and VERY dirty way of getting this info from the royalmail site using the webbrowser control. This uses a list box to display the results and two command buttons, one to navigate to the entry page and the other to do the lookup.
Private Sub Command1_Click()
WebBrowser1.Document.All.I tem(7).All .Item(55). Value = Text1.Text
WebBrowser1.Document.All.I tem(7).All .Item(66). Click
End Sub
Private Sub Command2_Click()
WebBrowser1.Navigate2 "http://pol.royalmail.com/AF.asp"
End Sub
Private Sub WebBrowser1_DocumentComple te(ByVal pDisp As Object, URL As Variant)
If URL = "http://pol.royalmail.com/AF.asp" Then
'Found the start
ElseIf URL = "http://pol.royalmail.com/AF-proc.asp" Then
List1.Clear
For intItem = 0 To WebBrowser1.Document.All.I tem(7).All .length - 1
If WebBrowser1.Document.All.I tem(7).All .Item(intI tem).TagNa me = "OPTION" Then
List1.AddItem WebBrowser1.Document.All.I tem(7).All .Item(intI tem).Text
End If
Next
If List1.ListCount = 0 Then
List1.AddItem "Postcode : " & Text1.Text & " Not Found!"
End If
End If
End Sub
Private Sub Command1_Click()
WebBrowser1.Document.All.I
WebBrowser1.Document.All.I
End Sub
Private Sub Command2_Click()
WebBrowser1.Navigate2 "http://pol.royalmail.com/AF.asp"
End Sub
Private Sub WebBrowser1_DocumentComple
If URL = "http://pol.royalmail.com/AF.asp" Then
'Found the start
ElseIf URL = "http://pol.royalmail.com/AF-proc.asp" Then
List1.Clear
For intItem = 0 To WebBrowser1.Document.All.I
If WebBrowser1.Document.All.I
List1.AddItem WebBrowser1.Document.All.I
End If
Next
If List1.ListCount = 0 Then
List1.AddItem "Postcode : " & Text1.Text & " Not Found!"
End If
End If
End Sub
ASKER
TimCottee,
Your example works very well, I have just a couple of questions about Command1
Private Sub Command1_Click()
WebBrowser1.Document.All.I tem(7).All .Item(55). Value = Text1.Text
WebBrowser1.Document.All.I tem(7).All .Item(66). Click
End Sub
How do you know that Item(7).All.Item(55).Value is the place where the text box with the postcode is. I have viewed the sourcecode for http://pol.royalmail.com/AF.asp but I cannot see how you know which value is (55) and which is (66) etc, and where is the part for item(7).
I haven't used the web browser control before, I know this is not part of the question but I am just curious to know and I will give you the points when I understand this bit.
Thanks Damien
Your example works very well, I have just a couple of questions about Command1
Private Sub Command1_Click()
WebBrowser1.Document.All.I
WebBrowser1.Document.All.I
End Sub
How do you know that Item(7).All.Item(55).Value
I haven't used the web browser control before, I know this is not part of the question but I am just curious to know and I will give you the points when I understand this bit.
Thanks Damien
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
What I have done is copy the first file to my hard drive and only kept the postcode text box and the search (submit) button and on search point to the web page no2, and used form1.submit instead of item(66).
'<FORM action='http://pol.royalmail.com/AF-proc.asp' method=post name=form1
onsubmit="return CheckSubmit();">
Private Sub Command1_Click()
WebBrowser1.Document.body. All.postco de.Value = Text1.Text
WebBrowser1.Document.body. All.Form1. submit
Command1.Enabled = False
Command2.Enabled = True
End Sub
Private Sub Command2_Click()
WebBrowser1.Navigate2 "c:\postcode\AF.asp"
Command1.Enabled = True
Command2.Enabled = False
End Sub
Anyway
Thanks everyone
Damien
'<FORM action='http://pol.royalmail.com/AF-proc.asp' method=post name=form1
onsubmit="return CheckSubmit();">
Private Sub Command1_Click()
WebBrowser1.Document.body.
WebBrowser1.Document.body.
Command1.Enabled = False
Command2.Enabled = True
End Sub
Private Sub Command2_Click()
WebBrowser1.Navigate2 "c:\postcode\AF.asp"
Command1.Enabled = True
Command2.Enabled = False
End Sub
Anyway
Thanks everyone
Damien