Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Webbrowser.Navigate

Status
Not open for further replies.

joewolter52

Programmer
May 24, 2005
1
US

No matter what I use for noCache I sometimes get prompted to save the .doc file when I Navigate to another document.

How can I ensure that I am never prompted when exiting the document?



procedure TForm1.btnOpenFileClick(Sender: TObject);
var
theFile :String;
theType :String;
noCache :OLEvariant;
begin

//Navigate to these readonly files.
if Sender = btnHtm then theType := '.htm#H1' else
if Sender = btnDoc then theType := '.doc#H1'
else theType := '.pdf#H1';

theFile := ExtractFileDir(application.ExeName)+'\Data\aTest'+theType;

noCache := 0; //4-Do not read from; 8-Do not write to cache.
WebBrowser1.Navigate(WideString(theFile),noCache);
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top