This is weird. Why does Visio throw exception?
Scenario:
- Open new instance of Visio.
- Press CTRL+N for a blank new document.
- Goto VB editor.
- Open the default "ThisDocument" code file.
Paste the following code.
Sub test() Application.ActiveWindow.SelectAll End Sub
Execute the subroutine "test".
You will observe this exception for code line "Application.ActiveWindow.SelectAll":
---------------------------
Microsoft Visual Basic for Applications
---------------------------
Run-time error '-2032465766 (86db089a)':
Requested operation is presently disabled.
---------------------------
OK Help
---------------------------
Does anyone know why?