MEGA Search
20.3 Million


Sign Up
From: Aleksandrs Tihonovs  
Subject: OLE error 800A0258
NewsGroup: borland.public.delphi.activex.controls.using
Date Posted: 21-Mar-2003 at 14:28:33 PST
Hi there,
I using TWebBrowser control in my form, but I have some probs with it.
After loading html document in the browser, I handle OnDocumentComplete
event to modify the document.
But when I try change HTML an OLEexception raise up. What is wrong?
I dont know how, but it worked at the begining.

procedure TForm1.WebBrowser1DocumentComplete(Sender: TObject;
  const pDisp: IDispatch; var URL: OleVariant);
var Doc: IHTMLDocument2;
    Obj: IHTMLElement;
begin
  Doc := webbrowser1.document as IHTMLDocument2;
  Obj := Doc.all.item('tabledata',0) as IHTMLElement;
  Obj.innerHTML := 'Test'; --> OLEException raise here.
end;