Sub Test() Dim ret As VbMsgBoxResult If ActiveDocument.Pages.Count = 1 Then ret = MsgBox("Document contains only 1 page. Do you want to continue?", vbYesNo) If ret = vbNo Then Exit Sub End If End Sub