HTML Import not parsing properly when using VB or macro

M

Mary

I need to import an HTML table on a regular basis. I have used the Import
wizard and created an Import specification and it all works well. When I
automate the process, using either a macro or the VB command
Docmd.transfertext, the file does not parse properly even though I am using
the same specification. About 40 records are ignored and then it starts to
populate from the middle of a record so the data from field 15 goes into
field 1, field 16 goes to field 2 etc.
I have tried this in both Access 2003 and Access 2007 and get the same
results.
I have looked at the HTML table from IE7 and from Excel and it seems to
parse properly.
It seems that the macro/vb command is using a different converter file from
the Import Wizard Is there any way to be sure it uses the same one as the
manual import? Or any other suggestions? I cannot expect the user to manually
run the import wizard every time.
 
M

Mark A. Sam

Mary,

I don't have the solution to your problem but have a workaround. Link to the
HTML table, then use a maketable or append query to put the data where you
want it. If the HTML document changes, the table link will maintain its
integrity (still work) as long as the format is that same.

If you need more help, post back.

God Bless,

Mark A. Sam
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top