This macro start in autoopen.
It open 4 session.
After this operation is possible via VBA to close the printer session?
' La macro per layout viene eseguita quando l'utente
'seleziona l'apertura di un determinato layout. Questo file
'non dovrebbe essere modificato.
'
' Ripetere quanto segue per ciascuna sessione di layout
'
' <nome file> = nome del documento sessione
Sub Main()
Dim System As Object
Dim Sessions As Object
Dim QPads As Object
Dim QPad As Object
Dim Session1 As Object
Dim Session2 As Object
Dim Session3 As Object
Dim Session4 As Object
Set System = CreateObject("EXTRA.System")
Set Sessions= System.Sessions
Sessions.CloseAll
Set Session1 = Sessions.Open ("C:\PROGRAMMI\ATTACHMATE\E!E2K\SESSIONS\CL151F4500_A.EDP")
Set QPads = Session1.QuickPads
QPads.HideAll
Session1.Top = -1' Coordinate dello schermo
session1.Left = -1' Coordinate dello schermo
Session1.WindowState = xMAXIMIZED' Window state: xNORMAL, xMAXIMIZED, xMINIMIZED
Session1.Visible = 1' TRUE = Show window, FALSE = Hide window
Set Session2 = Sessions.Open ("C:\PROGRAMMI\ATTACHMATE\E!E2K\SESSIONS\CL151F4500_B.EDP")
Set QPads = Session2.QuickPads
QPads.HideAll
Session2.Top = -1' Coordinate dello schermo
session2.Left = -1' Coordinate dello schermo
Session2.WindowState = xMAXIMIZED' Window state: xNORMAL, xMAXIMIZED, xMINIMIZED
Session2.Visible = 1' TRUE = Show window, FALSE = Hide window
Set Session3 = Sessions.Open ("C:\PROGRAMMI\ATTACHMATE\E!E2K\SESSIONS\CL151F4500_C.EDP")
Set QPads = Session3.QuickPads
QPads.HideAll
Session3.Top = -1' Coordinate dello schermo
session3.Left = -1' Coordinate dello schermo
Session3.WindowState = xMAXIMIZED' Window state: xNORMAL, xMAXIMIZED, xMINIMIZED
Session3.Visible = 1' TRUE = Show window, FALSE = Hide window
Set Session4 = Sessions.Open ("C:\PROGRAMMI\ATTACHMATE\E!E2K\SESSIONS\CL151F4500_PRT.EPP")
Set QPads = Session4.QuickPads
QPads.HideAll
Session4.Top = 143' Coordinate dello schermo
session4.Left = 140' Coordinate dello schermo
Session4.Width = 545' Larghezza schermo in pixel
Session4.Height = 239' Altezza schermo in pixel
Session4.WindowState = xNORMAL' Window state: xNORMAL, xMAXIMIZED, xMINIMIZED
Session4.Visible = 1' TRUE = Show window, FALSE = Hide window
End Sub
It open 4 session.
After this operation is possible via VBA to close the printer session?
' La macro per layout viene eseguita quando l'utente
'seleziona l'apertura di un determinato layout. Questo file
'non dovrebbe essere modificato.
'
' Ripetere quanto segue per ciascuna sessione di layout
'
' <nome file> = nome del documento sessione
Sub Main()
Dim System As Object
Dim Sessions As Object
Dim QPads As Object
Dim QPad As Object
Dim Session1 As Object
Dim Session2 As Object
Dim Session3 As Object
Dim Session4 As Object
Set System = CreateObject("EXTRA.System")
Set Sessions= System.Sessions
Sessions.CloseAll
Set Session1 = Sessions.Open ("C:\PROGRAMMI\ATTACHMATE\E!E2K\SESSIONS\CL151F4500_A.EDP")
Set QPads = Session1.QuickPads
QPads.HideAll
Session1.Top = -1' Coordinate dello schermo
session1.Left = -1' Coordinate dello schermo
Session1.WindowState = xMAXIMIZED' Window state: xNORMAL, xMAXIMIZED, xMINIMIZED
Session1.Visible = 1' TRUE = Show window, FALSE = Hide window
Set Session2 = Sessions.Open ("C:\PROGRAMMI\ATTACHMATE\E!E2K\SESSIONS\CL151F4500_B.EDP")
Set QPads = Session2.QuickPads
QPads.HideAll
Session2.Top = -1' Coordinate dello schermo
session2.Left = -1' Coordinate dello schermo
Session2.WindowState = xMAXIMIZED' Window state: xNORMAL, xMAXIMIZED, xMINIMIZED
Session2.Visible = 1' TRUE = Show window, FALSE = Hide window
Set Session3 = Sessions.Open ("C:\PROGRAMMI\ATTACHMATE\E!E2K\SESSIONS\CL151F4500_C.EDP")
Set QPads = Session3.QuickPads
QPads.HideAll
Session3.Top = -1' Coordinate dello schermo
session3.Left = -1' Coordinate dello schermo
Session3.WindowState = xMAXIMIZED' Window state: xNORMAL, xMAXIMIZED, xMINIMIZED
Session3.Visible = 1' TRUE = Show window, FALSE = Hide window
Set Session4 = Sessions.Open ("C:\PROGRAMMI\ATTACHMATE\E!E2K\SESSIONS\CL151F4500_PRT.EPP")
Set QPads = Session4.QuickPads
QPads.HideAll
Session4.Top = 143' Coordinate dello schermo
session4.Left = 140' Coordinate dello schermo
Session4.Width = 545' Larghezza schermo in pixel
Session4.Height = 239' Altezza schermo in pixel
Session4.WindowState = xNORMAL' Window state: xNORMAL, xMAXIMIZED, xMINIMIZED
Session4.Visible = 1' TRUE = Show window, FALSE = Hide window
End Sub