Results 1 to 2 of 2
  1. #1
    cherold is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Dec 2014
    Posts
    82

    Is it possible to pull the text from a web page into a string variable?

    I'd like to open a web page in the way one can open a local file. Ideally something as simple as:



    Code:
    url = "https://somesite.com/somepage.html" 
    
    Open url for Input as #1
    Then I could just read all the content into a string and pull the information I want out.

    Is there any sort of mechanism to do something along these lines?

  2. #2
    isladogs's Avatar
    isladogs is offline Access MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,204
    You can easily read the contents of a web page to a text file then save part or (in theory) all of it to a variable.
    I said in theory as the file will contain lots of extraneous 'junk' you won't want.
    Anyway, one way of doing this is demonstrated in an example database I posted at https://www.access-programmers.co.uk...d.php?t=293970
    Colin Riddington, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I know I don't know, I keep quiet!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Need to pull number from within text string
    By FrankBone in forum Queries
    Replies: 8
    Last Post: 06-09-2015, 09:44 AM
  2. Replies: 2
    Last Post: 04-05-2015, 06:06 PM
  3. Adding textbox.text to a string variable...
    By MatthewGrace in forum Programming
    Replies: 2
    Last Post: 05-20-2014, 11:43 AM
  4. Preserving String variable formatting in text box
    By Monterey_Manzer in forum Forms
    Replies: 5
    Last Post: 06-18-2013, 09:39 AM
  5. Replies: 3
    Last Post: 05-28-2013, 12:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums