Solved

address recognition software

Posted on 2001-06-26
8
150 Views
Last Modified: 2010-05-02
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
0
Comment
Question by:damienm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 43

Expert Comment

by:TimCottee
ID: 6227214
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.
0
 
LVL 18

Expert Comment

by:deighton
ID: 6227219
0
 
LVL 17

Expert Comment

by:inthedark
ID: 6227242
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.
0
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 2

Author Comment

by:damienm
ID: 6227292
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.
0
 
LVL 43

Expert Comment

by:TimCottee
ID: 6227303
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.Item(7).All.Item(55).Value = Text1.Text
    WebBrowser1.Document.All.Item(7).All.Item(66).Click
End Sub

Private Sub Command2_Click()
    WebBrowser1.Navigate2 "http://pol.royalmail.com/AF.asp"
End Sub

Private Sub WebBrowser1_DocumentComplete(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.Item(7).All.length - 1
            If WebBrowser1.Document.All.Item(7).All.Item(intItem).TagName = "OPTION" Then
                List1.AddItem WebBrowser1.Document.All.Item(7).All.Item(intItem).Text
            End If
        Next
        If List1.ListCount = 0 Then
            List1.AddItem "Postcode : " & Text1.Text & " Not Found!"
        End If
    End If
End Sub
0
 
LVL 2

Author Comment

by:damienm
ID: 6227471
TimCottee,

Your example works very well, I have just a couple of questions about Command1

Private Sub Command1_Click()
   WebBrowser1.Document.All.Item(7).All.Item(55).Value = Text1.Text
   WebBrowser1.Document.All.Item(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
0
 
LVL 43

Accepted Solution

by:
TimCottee earned 75 total points
ID: 6227539
Trial and error in this case, I don't tend to use it much myself and just went through the the list of tags and found the appropriate ones. Here is a slightly cleaner version which replaces some of this guesswork though I still can't find the appropriate item for the search button click (Item 66). document.all.Item(7) is equivalent t document.body, I just wasn't trying to be desperately clean about things merely testing out the theory.

Private Sub Command1_Click()
    WebBrowser1.Document.body.All.postcode.Value = Text1.Text
    WebBrowser1.Document.body.All.Item(66).Click
    Command1.Enabled = False
    Command2.Enabled = True
End Sub

Private Sub Command2_Click()
    WebBrowser1.Navigate2 "http://pol.royalmail.com/AF.asp"
    Command1.Enabled = True
    Command2.Enabled = False
End Sub

Private Sub Form_Load()
    Command2.Enabled = True
    Command1.Enabled = False
    Command2.Caption = "Go To Postcodes"
    Command1.Caption = "Search For Addresses"
End Sub

Private Sub WebBrowser1_DocumentComplete(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 Each Address In WebBrowser1.Document.All.tags("OPTION")
            List1.AddItem Address.Text
        Next
        If List1.ListCount = 0 Then
            List1.AddItem "Postcode : " & Text1.Text & " Not Found!"
        End If
    End If
End Sub

0
 
LVL 2

Author Comment

by:damienm
ID: 6227701
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.postcode.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
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Run code from text file in vb 1 101
vb6 connector to SQL Server 2 42
Add and format columns in vb6 7 82
Protecting vb6 & .Net code Obfuscation 18 210
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question