expression.Document As WebDocument object
where expression is a variable that represents a WebControl Object
expression.Document As WebDocument object
'This example opens a Web session, waits a few seconds, and closes the session without saving Sub createAndCloseWebSession() 'Declare application, terminal, and view object variables: Dim app As Attachmate_Reflection_Objects_Framework.ApplicationObject Dim wControl As Attachmate_Reflection_Objects.WebControl Dim wDocument As WebDocument Dim view As Attachmate_Reflection_Objects.view Dim rcode As ReturnCode Dim path As String 'Get a handle to the workspace Set app = GetObject("Reflection Workspace") 'Open a session to create a Web control path = Environ$("USERPROFILE") & "\Documents\Micro Focus\Reflection\" & "OpenWebDemo.urlx" Set wControl = app.CreateControl(path) 'Wait until the Web page is ready and then set it as the Web document Do Until wControl.ReadyState = WebBrowserReadyState_Complete app.Wait (1000) Loop Set wDocument = wControl.Document 'Set a view to make the session visible Set view = ThisFrame.CreateView(wControl) 'send additional commands to work with the session app.Wait (5000) 'Close the session without saving rcode = wControl.Close(CloseOption_CloseNoSave) End Sub