joewolter52
Programmer
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;