********************************************************
********************************************************
*** 'ARKADAŞLAR LÜTFEN KODBANK"TAN YARDIM İSTEMEYİN' ***
************* 'FORUMLARDAN YARDIM İSTEYİN' *************
********************************************************
********************************************************
procedure TWordPreviewForm.FormCreate(Sender: TObject) ;
begin
//open a Word document in WebBrowser
WebBrowser1.Navigate('c:\SomeFolder\SomeDocument.doc') ;
end;
procedure TWordPreviewForm.WebBrowser1NavigateComplete2(Sender: TObject;
const pDisp: IDispatch; var URL: OleVariant) ;
begin
with (WebBrowser1.Document AS _Document) do
begin
ActiveWindow.View.ShowAll := False;
ActiveWindow.View.TableGridlines := False;
ActiveWindow.DisplayRulers := False;
ActiveWindow.View.type_ := wdPageView;
end;
end;