Board index » delphi » Close a doc without show "Save dialog Box"

Close a doc without show "Save dialog Box"

Hi

In my application i only show word to make a print preview, and the user
have to close it, and i want to know if exists some way to close word
without show then message box "Save"

Thanks a lot.
Pedro Bordonhos

 

Re:Close a doc without show "Save dialog Box"


<<Pedro Bordonhos:
i want to know if exists some way to close word
without show then message box "Save"

Quote

var
  SaveChanges: OleVariant;
begin
  SaveChanges := wdDoNotSaveChanges;
  Word.Quit(SaveChanges, EmptyParam, EmptyParam);

--
Deborah Pate

Re:Close a doc without show "Save dialog Box"


If you have office 2000, make sure you install the VBA help.
Then open this file:

"C:\Program files\Microsoft Office\Office\1031\VBAWRD9.CHM"

it contains a very good programmers' manual for Word!

--
Arthur Hoornweg
(To answer me, please remove the ".net" from my e-mail address)

Re:Close a doc without show "Save dialog Box"


Sorry, i don't explain very well.

Is not me that want close word, is the user.

the problem is : user close word normally and appears save dialog box, and i
don't want that he save the document.

Thanks a lot

Pedro Bordonhos

Re:Close a doc without show "Save dialog Box"


<<Pedro Bordonhos:
user close word normally and appears save dialog box, and i
don't want that he save the document.

Quote

The only way (at least in Word97) is to cheat: save the
file yourself in the Document.OnClose event, then delete
it.

--
Deborah Pate

Other Threads