title kinda says it all.
for some reason that's driving me nuts I cant get the active page from visio.
I can get the document just fine, like this...
Dim vsoDoc As Microsoft.Office.Interop.Visio.Document = Globals.ThisAddIn.Application.ActiveDocument
but even though I am looking at a drawing, the debugger always says my active page is nothing. these are the lines I'm using...
Dim vsoPage As Microsoft.Office.Interop.Visio.Page
vsoPage = Globals.ThisAddIn.Application.ActivePage 'this is returning nothing, why?
normally, I'd have those two lines concatenated like the activedocument one, I split it up when I started having problems
I hope someone can shed some light on this
Thanks
Do the other properties of the application return values (activewindow, activedocument, etc.)?
active document works as expected but even active window is "nothing" even though I can pull other properties from it like so...
If Globals.ThisAddIn.Application IsNot Nothing AndAlso Globals.ThisAddIn.Application.ActiveWindow IsNot Nothing Then
If UCase(Microsoft.VisualBasic.Right(vsoDoc.FullName, 3)) = "VSD" Then
window = Globals.ThisAddIn.Application.ActiveWindow
currentDocument = window.Document.Name
End If
here, window is "nothing" in the debugger, but "currentdocument" has the appropriate value
I found the answer here!
http://stackoverflow.com/questions/34545354/internal-error-in-the-expression-evaluator
its working now ;D