473,411 Members | 1,923 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,411 software developers and data experts.

Source Code of webpage

14
I would just like to know if it is possible to get the source code of a webpage through VB in Access. I need to copy the code to another webpage after that.

If anyone knows how to do that please let me know

Thanks
Sep 25 '07 #1
1 2086
nico5038
3,080 Expert 2GB
It is, just create a form with the Webbrowser control.
Now you can point to an URL with:
Expand|Select|Wrap|Line Numbers
  1. Me.webbrowser1.Navigate URL:="<the needed URL e.g. from your form>"
  2.  
When the page is visible you need to use:
Expand|Select|Wrap|Line Numbers
  1. Dim doc As MSHTML.HTMLDocument
  2. Set doc = Me.webbrowser1.Document
  3.  
To get the browser data available and personally I use only selected text on such a page like:

Expand|Select|Wrap|Line Numbers
  1. strSelectedText = doc.selection.createRange().Text
  2.  
There's more to this, but you'll have to check the HTMLDocument options to get it all.

Nic;o)
Oct 5 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: M.E.Farmer | last post by:
Hello c.l.py!, I have just finished this and decided to share. PySourceColor is a module to convert Python source into colored html. Yes it has been done before, but I like this better:) You can...
2
by: Mike | last post by:
Hello, I am trying to find a way to better analyze the meta tags on my website. I would like to get the source code and then parse the code for the meta tags, links, etc. Can someone give me...
1
by: Sanka | last post by:
Does anyone know any VB code where I can move the HTML coding that I have in a Notepad file to the source code of a webpage? Thanks Sanka
13
by: Seb | last post by:
With php I can simply append a s to the file extension, eg. .phps and if the user request the file the source will be shown in the browser. Is there a semilar functionality for aspx pages? ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.