- Код: Выделить всё
On Error GoTo WaitAwhileLonger
WB.document.write sPageHTML
While WB.readyState <> READYSTATE_COMPLETE
'ждём создания документа
DoEvents
Wend
- Код: Выделить всё
sPageHTML = "<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>" _
& vbCrLf & "<HTML><HEAD><META http-equiv=Content-Type content=" & Chr(34) & "text/html; charset=windows-1251" & Chr(34) & ">" _
& vbCrLf & "<META content=" & Chr(34) & "MSHTML 6.00.2900.2180" & Chr(34) & " name=GENERATOR>" & vbCrLf _
& "<STYLE TYPE=" & Chr(34) & "text/css" & Chr(34) & ">" & vbCrLf
'здесь стили...
sPageHTML = sPageHTML & "</STYLE>" & vbCrLf & "</HEAD>" & vbCrLf
sPageHTML = sPageHTML & "<BODY " _
& HeaderHTML.BodyBACKGROUND & " " _
& HeaderHTML.BodyBGCOLOR & " " _
& HeaderHTML.BodyText & " " _
& HeaderHTML.BodyLINK & " " _
& HeaderHTML.BodyVLINK & " " _
& HeaderHTML.BodyALINK & " " _
& "topmargin=" & Chr(34) & "1" & Chr(34) & " leftmargin=" & Chr(34) & "5" & Chr(34) & ">" & vbCrLf _
& "<div id=MyID></div>" & vbCrLf _
& "</BODY>" & vbCrLf _
& "</HTML>" & vbCrLf
Записывается после WB.document.write
? WB.document.body.innerhtml
<DIV id=MyID></DIV>