I am opening MS Office Document file in AxWebBrowser
after that I navigate to next Office Document ,before navigating I saved the last document like this
AxWebBrowser1.ExecWB(SHDocVw.OLECMDID.OLECMDID_SAVE, SHDocVw.OLECMDF.OLECMDF_ENABLED)
but how can I navigate to next Document without saving it even if it also have any changes?
if I do not use above line of code it ask for " Save
", "Don't Save"
and " Cancel
" before navigating to next document.
help me thanks
You could kill all Excel and Winword processes before opening the next:
Try
For Each prog As Process In Process.GetProcesses
If prog.ProcessName = "EXCEL" Then prog.Kill()
If prog.ProcessName = "WINWORD" Then prog.Kill()
Next
Catch
err("Error Closing files")
End Try
也许首先尝试重新加载页面,请确保使用重新加载而不刷新,因为刷新只会应用未加载的更改。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.