I have some code from 9.3 that would check the CurrentContentsView.ContextItem to ensure that the TOC was in Display (or Drawing Order) view. If not it would set it to Display via:
If Not pDoc.CurrentContentsView.ContextItem = 1 Then Set pDoc.CurrentContentsView.ContextItem = 1 pDoc.ContentsView(1).Refresh Nothing End If pDoc.ContentsView(1).Refresh Nothing
Now that the TOC is a DockableWindow (which I can access) and there are several IContentsViews, this no longer works. It's surprising that this is impossible to find in the forums and the VBA SDK as as brief and cryptic as could be.
How do I access the ContextItem (which seems stuck at NULL) to set it? Also, is the fact that "currentContentsView" automatically reverts to a lower-case "c" when the object apparently shouldhave an upper-case "C" significant?
Any help would be MUCH appreciated. For some reason, my code runs 3x faster in Display View and I want to automatically set it if the user forgets (or doesn't know).
Oh...and yes, I AM aware of VBA's demise and the existence of Python. Noted.
Thanks in advance.