CurrentBrowser
Interface AntViewDocument
Type: Property
Access: Write
Parameters: IAntView Browser
Returns: nothing
In order to be able to use the AntViewDocument interface, you need to connect the document object the WebView2 browser or frame object that you want to use it with.
You do this by passing the variant object reference of the instantiated AntView control.
For example in VBA that looks like this:
' create a document object instance
Set Document = CreateObject("AntViewAx.AntViewDocument")
Document.CurrentBrowser = EdgeWebBrowser
where EdgeWebBrowser is an object of the AntView control.
For VB6 there's an alternative method BrowserDispatch you can set as VB6 will throw an "interface not supported" error if you try to use CurrentBrowser.
Note that this is a write only property, you can assign it an AntView browser object or AntView Frame object. However as it is a write only property, you cannot read the property to see if it was assigned.
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/25/2024