Changing <body bgcolor...> in a HTML-File in VB.Vet

G

Guest

I've created HTM-Files that starts with the the follow codesnipet

<html>
<head>
<title>Programm</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="Microsoft Theme" content="none">
</head>
<body bgcolor="#ffffff">
<p>
<font face="Microsoft Sans Serif" size="4">Programm<i> - </i><b>Ansicht</b></font></p>
<dl>
 
H

Herfried K. Wagner [MVP]

Guest said:
Me.AxWebBrowser1.Navigate(appPath & htmFile & ".htm")

I want to change the

<body bgcolor="#nnnnnn">

in my programm bevore the .htm-File gets displayed.

The code below will change the color immediately after the document is
displayed:

\\\
Private Sub AxWebBrowser1_DocumentComplete( _
ByVal sender As Object, _
ByVal e As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent _
) Handles AxWebBrowser1.DocumentComplete
Me.AxWebBrowser1.Document.body.style.backgroundColor = "red"
End Sub
///
 
G

Guest

I've created HTM-Files that starts with the the follow codesnipet

<html>
<head>
<title>Programm</title>
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="Microsoft Theme" content="none">
</head>
<body bgcolor="#ffffff">
<p>
<font face="Microsoft Sans Serif" size="4">Programm<i> - </i><b>Ansicht</b></font></p>
<dl>
.
.
displayed in my application via

Me.AxWebBrowser1.Navigate(appPath & htmFile & ".htm")

I want to change the

<body bgcolor="#nnnnnn">

in my programm bevore the .htm-File gets displayed.

How can I do that?

Thanks for any reply !

User submitted from AEWNET (http://www.aewnet.com/)

Great !!!!!!!!!!!!!!!!!!! That's it !!!!!!!!!!!!!!!!!
Thank you so much !

User submitted from AEWNET (http://www.aewnet.com/)
 

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