Hi Hubert,
You can get all visible documents as a DocumentsEnumerator with that code:
Dim invApp As Application
Set invApp = ThisApplication
Dim docs As DocumentsEnumerator
Set docs =invApp.Documents.VisibleDocuments
I can't understand what did you mean by ID but, if you are talking about indexes, indexes starting from 1 so if you use 0 you will get an error.
This is activating the second tab from left
Dim invApp As Application
Set invApp = ThisApplication
Dim docs As DocumentsEnumerator
Set docs = invApp.Documents.VisibleDocuments
Call docs.Item(2).Activate()
If you want to filter that thing (like the thing you defined as ID lets say)
You can activate the tab you need like this:
Dim invApp As Application
Set invApp = ThisApplication
Dim docs As DocumentsEnumerator
Set docs = invApp.Documents.VisibleDocuments
Dim doc As Document
For Each doc In docs
If '' put your condition here
Call doc.Activate
Exit For
End If
Next
You did not mention anything so I wrote them on VBA.
I hope it helps
Regards
Devrim
If my answer is solved your problem, please mark it as Solution
Freundliche Grüße / Kind Regards