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:
  1. If objwddoc.CommandBars("Print Preview").Controls("Close").OnAction = True Then
  2.      Set objwdrange = Nothing
  3.     objwddoc.Close (wdDoNotSaveChanges)
  4.     Set objwddoc = Nothing
  5.     objwdapp.Quit
  6. End If