Adoray

cls

Aug 17th, 2016
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. Option Explicit
  2. Private WithEvents m_oThisApp As Application
  3.  
  4. Private Sub Class_Initialize()
  5. Set m_oThisApp = Word.Application
  6. cls_Initialize_Reset
  7. lbl_Exit:
  8. Exit Sub
  9. End Sub
  10.  
  11. Private Sub m_oThisApp_DocumentOpen(ByVal doc As Document)
  12. cls_Initialize_Reset
  13. lblbl_Exit:
  14. Exit Sub
  15. End Sub
  16.  
  17. Private Sub m_oThisApp_DocumentChange()
  18. cls_Initialize_Reset
  19. lbl_Exit:
  20. Exit Sub
  21. End Sub
  22.  
  23. Private Sub m_oThisApp_WindowSelectionChange(ByVal Sel As Selection)
  24. cls_Initialize_Reset
  25. lbl_Exit:
  26. Exit Sub
  27. End Sub
  28.  
  29. Private Sub cls_Initialize_Reset()
  30. Dim lngCur As Long
  31. On Error GoTo lbl_Exit
  32. lngCur = System.Cursor
  33. System.Cursor = wdCursorNormal
  34. Module1.RemoveContentMenuItem
  35. Module1.BuildControls
  36. On Error GoTo 0
  37. System.Cursor = lngCur
  38. lbl_Exit:
  39. Exit Sub
  40. End Sub
Advertisement
Add Comment
Please, Sign In to add comment