I am trying to say, when the user clicks on print preview close, then the whole application closes.
It keeps saying type mismatch
VB Code:
If objwddoc.CommandBars("Print Preview").Controls("Close").OnAction = True Then Set objwdrange = Nothing objwddoc.Close (wdDoNotSaveChanges) Set objwddoc = Nothing objwdapp.Quit End If




Reply With Quote