Does Access have any tools or methods for reading web page source code and dropping it into a variable or a table? I am currently doing this in Cold Fusion, but would be interested in porting the application to Access if possible. Is Access yet that web-friendly?
![]() |
Patch reliability is unclear. Unless you have an immediate, pressing need to install a specific patch, don't do it. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Access-VBA code to read web pages (Access XP or 2K)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Access-VBA code to read web pages (Access XP or 2K)
- This topic has 9 replies, 6 voices, and was last updated 20 years, 2 months ago.
AuthorTopicWSDaleNapier
AskWoody LoungerMay 15, 2004 at 1:53 am #404950Viewing 2 reply threadsAuthorReplies-
WScharlotte
AskWoody Lounger -
WScharlotte
AskWoody Lounger -
WSMarkD
AskWoody LoungerMay 15, 2004 at 1:20 pm #827707Not sure what you mean by “web page source code” here, but if this means the source HTML for a web page, you can “capture” the HTML source as text file by using the technique illustrated in the attached demo database (A2K format). Demo uses URLDownloadToFile API function to capture HTML source as text file by specifying “.txt” as file extension for the szFileName parameter. The Scripting FileSystemObject (FSO) TextStream object is used to read downloaded text file and copy contents into an Access memo field (requires reference set to Scripting Runtime library). See frmHTML form in attached db. To test, enter source URL and Destination (full path & file name of text file to download to) in the textboxes, then click “Download” button (globe/pc icon). Visual feedback provided while download/import transpires. If you look at GetDownload sub (form module) you’ll see it was necessary to curtail importing text if exceeded 64,000 characters (which may often be the case for large web pages), otherwise you’d get the dreaded “Text too long to edit” message when trying to enter the SourceHTML (memo field) textbox on form. FSO TextStream ReadLine method used to read text one line at time & test length. (Supposedly a memo field can store appx 2 billion characters, but only if updated programmatically, if text entered via UI limited to a little over 2^16 or appx 64,000 characters.) The form has visual indicators (warning label, etc) when the limit is exceeded. In actual use you’d want to add code to validate that valid URL address and text file path are entered in the textboxes, etc.
If by “source code” you mean something else, please explain in more detail. In any event you may be able to adapt the techniques demonstrated here for what you have in mind.
HTH
-
WSDaleNapier
AskWoody Lounger -
WSDaleNapier
AskWoody Lounger -
WSsal21
AskWoody LoungerMarch 17, 2005 at 1:10 pm #935382Hi MarmD…
I have donwload your mdb and test it with:http://www.gssitaly.com/default.html (is my personal site)
I have error in download, why?
-
WSHansV
AskWoody Lounger
-
-
-
WSBodders
AskWoody LoungerMarch 31, 2005 at 1:10 pm #938278I was checking out this post, because of something I was trying to do which is quite similar.
I have developed an application which – among other things – stores details of possible job prospects. Rather than manually filling in all the job details, or copy-and-pasting from IE into the form, I would like to automate the process.
Here’s the URL of a sample job prospect : http://www.jobserve.com/W4720688FC15CD005.job
The only way I have found to import this so far is to input the URL, and then use Automation to open Excel, read the web page into Excel, and then search Excel for the appropriate fields. It works – just – but it’s not flexible, and I am sure there must be a better way to go about it. I wonder whether XML would help (I’m using Access 2003), but I don’t know enough about it to be sure.
Any thoughts or suggestions would be very welcome
Thanks
Nick
-
WSMarkD
AskWoody LoungerApril 14, 2005 at 8:46 am #940917In belated reply, sorry, do not know of a better way to import the data from web page into Access. In a previous thread (see Re: Importing from Excel (Ex 2002)) described method that can be used to import HTML table into Access – you can’t do this directly (in A2K anyway), you have to download the HTML page to a local folder, then import the downloaded HTML file. I tried this approach with the web site you referenced (the JobServe site) and did not work – got error msg (see attached text file for sample code used). Apparently the way this HTML is formatted does not allow importing – when viewing HTML source text could not identify a TITLE or CAPTION tag for table that could be used for the TransferText method’s HTMLtablename parameter (if left blank, Access tries to import first table found in file – see comments in attached file).
AFAIK, ACC 2000 does not support XML as an import/export format. I’m not currently using ACC 2002 or 2003 so don’t know if XML could be used for this. I recently had to “capture” similar data from a web site that provides “Cost Analysis” data in HTML table format – you input a bunch of parameters & options, submit form, and a HTML page is generated to display results. I wound up cuttin’ ‘n pastin’ results into Excel spreadsheets one at a time….
(fortunately this was a one-time task). Maybe someone more knowledgeable about HTML would have a better solution.
HTH
-
Viewing 2 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
Microsoft : Removal of unwanted drivers from Windows Update
by
Alex5723
13 minutes ago -
MacOS 26 beta 1 dropped support for Firewire 400/800
by
Alex5723
30 minutes ago -
Unable to update to version 22h2
by
04om
50 minutes ago -
Windows 11 Insider Preview Build 26100.4482 (24H2) released to Release Preview
by
joep517
7 hours, 58 minutes ago -
Windows 11 Insider Preview build 27881 released to Canary
by
joep517
8 hours, 1 minute ago -
Very Quarrelsome Taskbar!
by
CWBillow
18 hours, 13 minutes ago -
Move OneNote Notebook OFF OneDrive and make it local
by
CWBillow
20 hours, 57 minutes ago -
Microsoft 365 to block file access via legacy auth protocols by default
by
Alex5723
9 hours, 43 minutes ago -
Is your battery draining?
by
Susan Bradley
2 hours, 50 minutes ago -
The 16-billion-record data breach that no one’s ever heard of
by
Alex5723
3 hours, 42 minutes ago -
Weasel Words Rule Too Many Data Breach Notifications
by
Nibbled To Death By Ducks
1 day ago -
Windows Command Prompt and Powershell will not open as Administrator
by
Gordski
8 hours, 55 minutes ago -
Intel Management Engine (Intel ME) Security Issue
by
PL1
9 hours, 7 minutes ago -
Old Geek Forced to Update. Buy a Win 11 PC? Yikes! How do I cope?
by
RonE22
1 hour, 47 minutes ago -
National scam day
by
Susan Bradley
8 hours, 39 minutes ago -
macOS Tahoe 26 the end of the road for Intel Macs, OCLP, Hackintosh
by
Alex5723
4 hours, 49 minutes ago -
Cyberattack on some Washington Post journalists’ email accounts
by
Bob99
2 days, 1 hour ago -
Tools to support internet discussions
by
Kathy Stevens
14 hours, 34 minutes ago -
How get Group Policy to allow specific Driver to download?
by
Tex265
1 day, 16 hours ago -
AI is good sometimes
by
Susan Bradley
2 days, 9 hours ago -
Mozilla quietly tests Perplexity AI as a New Firefox Search Option
by
Alex5723
1 day, 23 hours ago -
Perplexity Pro free for 12 mos for Samsung Galaxy phones
by
Patricia Grace
3 days, 9 hours ago -
June KB5060842 update broke DHCP server service
by
Alex5723
3 days, 7 hours ago -
AMD Ryzen™ Chipset Driver Release Notes 7.06.02.123
by
Alex5723
3 days, 11 hours ago -
Excessive security alerts
by
WSSebastian42
2 days, 2 hours ago -
* CrystalDiskMark may shorten SSD/USB Memory life
by
Alex5723
3 days, 21 hours ago -
Ben’s excellent adventure with Linux
by
Ben Myers
11 hours, 38 minutes ago -
Seconds are back in Windows 10!
by
Susan Bradley
3 days, 8 hours ago -
WebBrowserPassView — Take inventory of your stored passwords
by
Deanna McElveen
2 days, 2 hours ago -
OS news from WWDC 2025
by
Will Fastie
1 day, 12 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.