PDA

View Full Version : Help : force to quit without save



forkus2000
03-13-2006, 05:19 AM
I have this situation :

I have visual basic 6 application, one form have a webbrowser axtivex, this webbrowser navigate my intranet. In this intranet i have a lot of word 's documents, when i click over a document this document are opened in the webbrowser, sometimes the user click inside the document and when the user click in the GoBack buttom Winword ask for save the document.

Can i supress this dialog?

can i open the document in view mode only?

Please help.

TonyJollans
03-13-2006, 07:32 AM
Opening a document as read-only won't suppress the message unfortunately.

I know next to nothing about running Word inside IE except that there must be some constraints on what you can do. I think you will need to trap the goback action somehow - if you can do that (a Sub Goback() ought to do it) the line of code you want is
ActiveDocument.Close wdDoNotSaveChanges

forkus2000
03-13-2006, 09:40 AM
Tony : i put yuor code line in the goback routine, but winword prompt a message "Document has changed. do you wish to save the changes?"

how can force to close ?

Regards Paolo