### Connect to SAP GUI Scripting Engine Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Example demonstrating how to connect to the SAP GUI scripting engine and wait for events. ```VBScript Dim objSapGui Set objSapGui = GetObject("SAPGUI") Dim objScriptingEngine Set objScriptingEngine = objSapGui.GetScriptingEngine WScript.ConnectObject objScriptingEngine, "Engine_" Dim Waiting Waiting = 1 Do While (Waiting = 1) WScript.Sleep(100) Loop Set objScriptingEngine = Nothing Set objSapGui = Nothing ``` -------------------------------- ### Handle Engine_CreateSession Event Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Example of a handler for the Engine_CreateSession event, which displays a message box when a session is created. ```VBA Sub Engine_CreateSession(ByVal Session) Dim result result = MsgBox("Session created", vbOKCancel) If result = vbCancel then Waiting = 0 End If End Sub ``` -------------------------------- ### GetStructureBlockStartLine Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns the start line of the structure block relevant to the line number passed to the method. ```APIDOC ## Public Function GetStructureBlockStartLine(ByVal Line As Long) As Long ### Description Returns the start line of the structure block relevant to the line number passed to the method. If the line resides within a nested block then the start line of the innermost block will be returned. If the line does not reside within a structure block at all then the method returns -1. ``` -------------------------------- ### Selected Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/60579254b8914b699dd2c681e8eb1b79.html Gets or sets the selection state of the checkbox. ```APIDOC ## Selected ### Description Represents the checked state of the component. Changing this value may trigger server communication depending on the ABAP Screen Painter definition. ### Type Byte (Read-write) ``` -------------------------------- ### GetColumnPosition Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Returns the screen position of the column, starting from 1. ```VBA Public Function GetColumnPosition( _ ByVal Column As String _ ) As Long ``` -------------------------------- ### Accessing DockerPixelSize Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/5074ad8cafcc488bbe1040c5bcd71385.html Gets or sets the size of the docker control in pixels. ```VB.NET Public Property DockerPixelSize As Long ``` -------------------------------- ### Get Title property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Represents the title of the grid control. ```VB Public Property Title As String ``` -------------------------------- ### Get SelectionMode property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Indicates the allowed selection behavior, such as RowsAndColumns, ListboxSingle, ListboxMultiple, or Free. ```VB Public Property SelectionMode As String ``` -------------------------------- ### Get ColumnCount property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Represents the number of columns in the control. ```VB Public Property ColumnCount As Long ``` -------------------------------- ### GetStructureBlockStartLine Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns the start line of the structure block relevant to the line number passed to the method. Returns -1 if the line does not reside within a structure block. ```VBA Public Function GetStructureBlockStartLine( _ ByVal Line As Long _ ) As Long ``` -------------------------------- ### Get or set ColumnOrder property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Contains all column identifiers in their current display order. Raises an exception if an invalid identifier is passed. ```VB Public Property ColumnOrder As Object ``` -------------------------------- ### ButtonCount Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/53a605dfd6b947a4a3399f48105eab17.html Gets the total number of buttons in the toolbar, including separators. ```VBA Public Property ButtonCount As Long ``` -------------------------------- ### Access Radio Button Group Information Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/12c0aa53e9bc4912a6729683ac39ec8d.html Properties and examples for interacting with the group of radio buttons to which the current object belongs. ```VBA Public Property GroupCount As Long ``` ```VBA Public Property GroupMembers As GuiComponentCollection ``` ```VBA Set GroupMembers = session.findById("wnd[0]/usr/radRB2").GroupMembers For Each GroupMember In GroupMembers MsgBox GroupMember.Text Next ``` ```VBA Public Property GroupPos As Long ``` -------------------------------- ### Get or set FirstVisibleRow property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html The index of the first visible row in the grid. Raises an exception if set to an invalid index. ```VB Public Property FirstVisibleRow As Long ``` -------------------------------- ### ContextMenu Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Emulates a request for the context menu. ```VBA Public Sub ContextMenu() ``` -------------------------------- ### Get or set SelectedColumns property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html A collection of column identifier strings. Raises an exception if the new collection contains an invalid identifier. ```VB Public Property SelectedColumns As Object ``` -------------------------------- ### Selected Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/12c0aa53e9bc4912a6729683ac39ec8d.html Gets or sets the selection state of the radio button. Setting this to True selects the button and deselects others in the group; setting to False results in an error. ```APIDOC ## Selected ### Description This property is True if the GuiRadioButton is selected. You can only set this property to True; setting it to False results in an error. ### Syntax Public Property Selected As Byte ``` -------------------------------- ### ContextMenu Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Fired when SAP GUI is about to display a context menu for supported GuiShell controls. ```APIDOC ## Event: ContextMenu ### Signature Public Event ContextMenu(ByVal Session As GuiSession, ByVal Component As GuiVComponent) ``` -------------------------------- ### GuiMenu.Select Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/2bfd2d74ba2a4345b6fa79bf8eb71315.html Selects the menu item in the SAP GUI. ```APIDOC ## Select ### Description Selects the menu item. ### Syntax Public Sub Select() ``` -------------------------------- ### Get RowCount property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Represents the total number of rows in the control. ```VB Public Property RowCount As Long ``` -------------------------------- ### Get or set SelectedCells property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html A collection of strings formatted as ",". Raises an exception if set to an invalid value. ```VB Public Property SelectedCells As Object ``` -------------------------------- ### PressEnter Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Emulates pressing the Enter key. ```VBA Public Sub PressEnter() ``` -------------------------------- ### Get VisibleRowCount property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Retrieves the number of rows currently visible in the grid. ```VB Public Property VisibleRowCount As Long ``` -------------------------------- ### SelectAll Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Highlights all text in the current document. ```VBA Public Sub SelectAll() ``` -------------------------------- ### Get ToolbarButtonCount property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html The total number of toolbar buttons, including separators. ```VB Public Property ToolbarButtonCount As Long ``` -------------------------------- ### BNF Grammar for SAP Connection Strings Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/5704456a1fbd43139311dab0e1175060.html Formal definition of the connection string syntax using BNF notation. Use this to construct valid connection strings for SAP GUI. ```text := [] := || := "/H/""/S/" := | := (any DNS hostname) := (any IP address, in dotted decimal form) := | := (any IP service name) := (any decimal number) := "/M/""/S/""/G/" := (any ASCII string not containing '/') := "/R/""/G/" := (any ASCII string not containing '/') := * := "/H/""/S/"["/P/"] := (any ASCII string not containing '/') ``` -------------------------------- ### Get FrozenColumnCount property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Represents the number of columns excluded from horizontal scrolling. ```VB Public Property FrozenColumnCount As Long ``` -------------------------------- ### ContextMenu Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/42597e94a6134dd4bd5fcab80d205798.html Opens a context menu for the specified ID. ```APIDOC ## ContextMenu ### Description Calling this function opens a context menu. ### Syntax Public Sub ContextMenu(ByVal strId As String) ``` -------------------------------- ### FocusedButton Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/53a605dfd6b947a4a3399f48105eab17.html Gets the zero-based index of the button currently holding focus. ```VBA Public Property FocusedButton As Long ``` -------------------------------- ### PressButton Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/53a605dfd6b947a4a3399f48105eab17.html Emulates pressing a button on the toolbar. ```APIDOC ## Public Sub PressButton(ByVal Id As String) ### Description This function emulates pressing the button with the given id. ``` -------------------------------- ### Submit Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/254da14a88074b17b14ac0a0b6aff45f.html Submits the input to the application. ```VBA Public Sub Submit() ``` -------------------------------- ### SelectAll Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Highlights all text in the document. ```APIDOC ## SelectAll ### Description Highlights all text in the current document for selection. ### Signature Public Sub SelectAll() ``` -------------------------------- ### HostedApplication Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/0484ad043f144233ba259b328c1338de.html Identifies the application hosted in the GuiOfficeIntegration object (1 for Word, 2 for Excel, 3 for PowerPoint). ```VBA Public Property HostedApplication As Long ``` -------------------------------- ### Get or set CurrentCellRow property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html The row index of the current cell, where -1 represents the title row. ```VB Public Property CurrentCellRow As Long ``` -------------------------------- ### Error Event (GuiApplication) Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Raised when the wrapper library for SAP GUI ActiveX control access is unavailable, available at the application level. ```VBA Public Event Error( _ ByVal ErrorId As Long, _ ByVal Desc1 As String, _ ByVal Desc2 As String, _ ByVal Desc3 As String, _ ByVal Desc4 As String _ ) ``` -------------------------------- ### SetBookmarks Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Sets bookmarks using a specific string format. ```VBA Public Sub SetBookmarks( _ ByVal Bookmarks As String _ ) ``` -------------------------------- ### Open Context Menu Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/42597e94a6134dd4bd5fcab80d205798.html Opens a context menu for the specified element ID. ```VBA Public Sub ContextMenu( _ ByVal strId As String _ ) ``` -------------------------------- ### Get or set CurrentCellColumn property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Identifies a column using the field name defined in the SAP data dictionary. ```VB Public Property CurrentCellColumn As String ``` -------------------------------- ### StartRequest Event Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Raised before the session is locked during server communication, allowing for input validation. ```VBA Public Event StartRequest( _ ByVal Session As GuiSession _ ) ``` -------------------------------- ### Error Event (GuiSession) Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Raised when the wrapper library for SAP GUI ActiveX control access is unavailable. ```VBA Public Event Error( _ ByVal Session As GuiSession, _ ByVal ErrorId As Long, _ ByVal Desc1 As String, _ ByVal Desc2 As String, _ ByVal Desc3 As String, _ ByVal Desc4 As String _ ) ``` -------------------------------- ### GuiTableRow Methods and Properties Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/5341bac75c8d428eb8460f6c84b13eee.html Reference for the methods and properties available on the GuiTableRow collection object. ```APIDOC ## Methods ### ElementAt(Index As Long) As GuiComponent Returns the member in the collection at the specified index (0 to count-1). Raises an exception if not found. ### Item(Index As Variant) As GuiComponent Returns the member in the collection at the specified index for compatibility with Visual Basic collections. Raises an exception if not found. ## Properties ### Count (Read-only) Returns the number of cells in the row (Long). ### Length (Read-only) Returns the number of cells in the row (Long). ### Selectable (Read-only) Returns True if the row can be selected (Byte). ### Selected (Read-write) Returns or sets whether the row is selected (Byte). ### Type (Read-only) Returns the type name of the component (String). ### TypeAsNumber (Read-only) Returns the type as a long value from the GuiComponentType enumeration (Long). ``` -------------------------------- ### Get or set SelectedRows property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html A comma-separated list of row indices or ranges. Raises an exception if set to an invalid string or indices. ```VB Public Property SelectedRows As String ``` -------------------------------- ### GuiContainerShell Object Reference Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/488da00ae4404046b57065fd1b13343e.html Overview of the GuiContainerShell object, including its inheritance from GuiVContainer and available members. ```APIDOC ## GuiContainerShell Object ### Description A GuiContainerShell is a wrapper for a set of the GuiShell Object. It extends the GuiVContainer Object. The type prefix is shellcont, and the name is the last part of the id, shellcont[n]. ### Properties - **AccDescription** (String) - Read-only. Accessibility description of the shell, used for shells without a title element. ### Inherited Methods - **From GuiVComponent**: DumpState, SetFocus, Visualize - **From GuiContainer**: FindById - **From GuiVContainer**: FindAllByName, FindAllByNameEx, FindByName, FindByNameEx ### Inherited Properties - **From GuiComponent**: ContainerType, Id, Name, Parent, Type, TypeAsNumber - **From GuiVComponent**: AccLabelCollection, AccText, AccTextOnRequest, AccTooltip, Changeable, DefaultTooltip, Height, IconName, IsSymbolFont, Left, Modified, ParentFrame, ScreenLeft, ScreenTop, Text, Tooltip, Top, Width - **From GuiContainer**: Children ``` -------------------------------- ### Accessing the AccDescription Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/488da00ae4404046b57065fd1b13343e.html Retrieves the accessibility description for the shell, useful for shells lacking a title element. ```vbscript Public Property AccDescription As String ``` -------------------------------- ### GoPreviousBookMark Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Navigates to the line where the previous non-numbered bookmark is set. ```APIDOC ## Public Sub GoPreviousBookMark() ### Description Navigates to the line where the previous non-numbered bookmark is set. ``` -------------------------------- ### Get or set FirstVisibleColumn property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Represents the first visible column in the scrollable area, excluding fixed columns. Raises an exception if set to an invalid identifier. ```VB Public Property FirstVisibleColumn As String ``` -------------------------------- ### GoNextBookMark Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Navigates to the line where the next none numbered bookmark is set. ```APIDOC ## Public Sub GoNextBookMark() ### Description Navigates to the line where the next none numbered bookmark is set. ``` -------------------------------- ### ConnectionString Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/8093f712d0ed4092a463b7edee5792cb.html Returns the connection string defining the backend connection, independent of SAP Logon entries. ```VBA Public Property ConnectionString As String ``` -------------------------------- ### Submit Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/254da14a88074b17b14ac0a0b6aff45f.html Submits the input to the application. ```APIDOC ## Public Sub Submit() ### Description Submits the input to the application. ``` -------------------------------- ### Document Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/0484ad043f144233ba259b328c1338de.html Accesses the document hosted inside the GuiOfficeIntegration object. ```VBA Public Property Document As Object ``` -------------------------------- ### ListNavigate Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/7892da6a9b83433583707d476207badf.html Sends a navigation command within ABAP Lists to the SAP system if supported by the current element. ```APIDOC ## ListNavigate ### Description Sends a navigation command within ABAP Lists to the SAP system. If the navigation is not supported, no command is sent. ### Signature Public Sub ListNavigate(ByVal NavType As String) ### Parameters - **NavType** (String) - Required - The type of navigation (e.g., TAB, TAB_BACK, JUMP_OVER, JUMP_OVER_BACK, JUMP_OUT, JUMP_OUT_BACK, JUMP_SECTION, JUMP_SECTION_BACK). ``` -------------------------------- ### Description Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/8093f712d0ed4092a463b7edee5792cb.html Provides a description of the connection if initiated via SAP Logon or OpenConnection. ```VBA Public Property Description As String ``` -------------------------------- ### Find component by label Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/7892da6a9b83433583707d476207badf.html Searches for a component by specifying its label text and type name. ```VBA Public Function FindByLabel( _ ByVal Text As String, _ ByVal Type As String _ ) As GuiComponent ``` -------------------------------- ### GuiAbapEditor Methods Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html A collection of methods available on the GuiAbapEditor object for managing text, formatting, and editor features. ```APIDOC ## AutoBraceEnabled ### Description Returns True if the auto brace facility is currently switched on. ### Signature `Public Function AutoBraceEnabled() As Byte` ## AutoComplete ### Description Invokes the auto complete list box. ### Signature `Public Sub AutoComplete()` ## ClipboardRingPaste ### Description Pastes an entry from the editor's clipboard ring to the editor. ### Parameters - **Index** (Long) - Required - One-based index of the clipboard entry as it appears in the ABAP editor context menu. ### Signature `Public Sub ClipboardRingPaste(ByVal Index As Long)` ## DeleteRange ### Description Defines a region of text for deletion. ### Parameters - **LineStart** (Long) - Required - Line number from where deletion is to begin. - **ColumnStart** (Long) - Required - Column number from where deletion is to begin. - **LineEnd** (Long) - Required - Line number where deletion will end. - **ColumnEnd** (Long) - Required - Column number where deletion will end. ### Signature `Public Sub DeleteRange(ByVal LineStart As Long, ByVal ColumnStart As Long, ByVal LineEnd As Long, ByVal ColumnEnd As Long)` ## GetAutoCompleteEntryText ### Description Returns a string representing the auto completion list box entry corresponding to the index supplied as a parameter. ### Parameters - **Index** (Long) - Required - The index of the auto completion entry. ### Signature `Public Function GetAutoCompleteEntryText(ByVal Index As Long) As String` ``` -------------------------------- ### SelectToolbarMenuItem Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Emulates selecting an item from the grid view toolbar context menu using the item's function code. ```VBA Public Sub SelectToolbarMenuItem( _ ByVal Id As String _ ) ``` -------------------------------- ### PressF1 Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/254da14a88074b17b14ac0a0b6aff45f.html Emulates pressing the F1 key while the focus is on the input field control. ```APIDOC ## Public Sub PressF1() ### Description Emulates pressing the F1 key while the focus is on the input field control. ``` -------------------------------- ### PressF4 Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/254da14a88074b17b14ac0a0b6aff45f.html Emulates pressing the F4 key while the focus is on the input field control. ```VBA Public Sub PressF4() ``` -------------------------------- ### AutomationFCode Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Notifies the listener that SAP GUI executes a function code set by the Workplace framework. ```APIDOC ## Event: AutomationFCode ### Signature Public Event AutomationFCode(ByVal Session As GuiSession, ByVal FunctionCode As String) ``` -------------------------------- ### SetDocument Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/0484ad043f144233ba259b328c1338de.html Replaces or adds a new document at the specified index, using a base64 representation of the binary document. ```VBA Public Sub SetDocument( _ ByVal Index As Long, _ ByVal Document As String _ ) ``` -------------------------------- ### PressToolbarContextButton Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Emulates opening the context menu of the grid view toolbar. ```VBA Public Sub PressToolbarContextButton( _ ByVal Id As String _ ) ``` -------------------------------- ### PressF1 Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/254da14a88074b17b14ac0a0b6aff45f.html Emulates pressing the F1 key while the focus is on the input field control. ```VBA Public Sub PressF1() ``` -------------------------------- ### SelectItems Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/42597e94a6134dd4bd5fcab80d205798.html Selects items specified by the provided string. ```APIDOC ## SelectItems ### Description Select the items specified by the parameter strItems. ### Syntax Public Sub SelectItems(ByVal strItems As String) ``` -------------------------------- ### CreateSession Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Raised whenever a new session is created, provided scripting support is enabled. ```APIDOC ## Event: CreateSession ### Signature Public Event CreateSession(ByVal Session As GuiSession) ``` -------------------------------- ### PressF4 Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/254da14a88074b17b14ac0a0b6aff45f.html Emulates pressing the F4 key while the focus is on the input field control. ```APIDOC ## Public Sub PressF4() ### Description Emulates pressing the F4 key while the focus is on the input field control. ``` -------------------------------- ### GetAutoCompleteToolTipDelay Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns the number of milliseconds, which elapse between highlighting an entry in the autocomplete listbox and the appearance of the corresponding tooltip window. ```APIDOC ## Public Function GetAutoCompleteToolTipDelay() As Long ### Description Returns the number of milliseconds, which elapse between highlighting an entry in the autocomplete listbox and the appearance of the corresponding tooltip window. ``` -------------------------------- ### PressButton Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/53a605dfd6b947a4a3399f48105eab17.html Emulates a user click on the toolbar button with the specified ID. ```VBA Public Sub PressButton( _ ByVal Id As String _ ) ``` -------------------------------- ### GetHTMLClipboardContents Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns a string containing the current contents of the clipboard in HTML format. ```APIDOC ## Public Function GetHTMLClipboardContents() As String ### Description Returns a string containing the current contents of the clipboard in HTML format. Returns an empty string if the clipboard does not contain anything in HTML format. ``` -------------------------------- ### SelectMenuItem Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/53a605dfd6b947a4a3399f48105eab17.html Emulates selecting a menu item by its ID. ```APIDOC ## Public Sub SelectMenuItem(ByVal Id As String) ### Description This function emulates selecting the menu item with the given id. ``` -------------------------------- ### GuiTabStrip Tab Selection Properties Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/30628a569e3a49288a80c4d73e3de908.html Properties to access the leftmost visible tab and the currently selected tab within the strip. ```vbnet Public Property LeftTab As GuiTab ``` ```vbnet Public Property SelectedTab As GuiTab ``` -------------------------------- ### UpperCase Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Converts selected text to upper case. ```VBA Public Sub UpperCase() ``` -------------------------------- ### SelectBlockRange Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Highlights a region of text in block mode, similar to holding the ALT key while dragging. ```VBA Public Sub SelectBlockRange( _ ByVal LineStart As Long, _ ByVal ColumnStart As Long, _ ByVal LineEnd As Long, _ ByVal ColumnEnd As Long _ ) ``` -------------------------------- ### Activated Event Syntax Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Syntax definition for the Activated event. ```VB Public Event Activated( _ ByVal Session As GuiSession _ ) ``` -------------------------------- ### GetRTFClipboardContents Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns a string containing the current contents of the clipboard in Rich Text format. ```APIDOC ## Public Function GetRTFClipboardContents() As String ### Description Returns a string containing the current contents of the clipboard in Rich Text format. Returns an empty string if the clipboard does not contain anything in Rich Text format. ``` -------------------------------- ### GuiMessageBoxOption Enumeration Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/539d19153430410a836d498bbd2c3e90.html The GuiMessageBoxOption enumeration provides constants to define the button configuration for message boxes displayed via the showMessageBox method. ```APIDOC ## GuiMessageBoxOption ### Description Defines the button options available for the showMessageBox method. ### Members - **MSG_OPTION_OK** (0) - Displays an 'OK' button only. - **MSG_OPTION_OKCANCEL** (2) - Displays an 'OK' button and a 'Cancel' button. - **MSG_OPTION_YESNO** (1) - Displays a 'Yes' button and a 'No' button. ``` -------------------------------- ### CreateSession Event Syntax Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Syntax definition for the CreateSession event, raised when a new session is created with scripting support enabled. ```VB Public Event CreateSession( _ ByVal Session As GuiSession _ ) ``` -------------------------------- ### Select a menu item Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/2bfd2d74ba2a4345b6fa79bf8eb71315.html Triggers the selection of the menu item. ```VBA Public Sub Select() ``` -------------------------------- ### Navigate to Previous Bookmark Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Navigates to the line where the previous non-numbered bookmark is set. ```VBA Public Sub GoPreviousBookMark() ``` -------------------------------- ### SelectContextMenuItem Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/87c4e965ed4e402b982dc399e34526c7.html Selects an item from the control’s context menu using the function code. ```APIDOC ## SelectContextMenuItem ### Description Select an item from the control’s context menu. ### Signature Public Sub SelectContextMenuItem(ByVal FunctionCode As String) ``` -------------------------------- ### GuiLabel Properties Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/2e44c4f890524686977e9729565f7824.html A collection of properties for the GuiLabel object, allowing developers to retrieve or set information about label components in SAP GUI. ```APIDOC ## GuiLabel Properties ### CaretPosition - **Type**: Long (Read-write) - **Description**: Sets or retrieves the caret position within a label. While not visualized as a caret, the position is transmitted to the server for ABAP application logic. ### CharHeight - **Type**: Long (Read-only) - **Description**: Returns the height of the GuiLabel in character metric. ### CharLeft - **Type**: Long (Read-only) - **Description**: Returns the left coordinate of the GuiLabel in character metric. ### CharTop - **Type**: Long (Read-only) - **Description**: Returns the top coordinate of the GuiLabel in character metric. ### CharWidth - **Type**: Long (Read-only) - **Description**: Returns the width of the GuiLabel in character metric. ### ColorIndex - **Type**: Long (Read-only) - **Description**: Returns the index of the list color for this element. ### ColorIntensified - **Type**: Byte (Read-only) - **Description**: Returns True if the Intensified flag is set in the screen painter. ### ColorInverse - **Type**: Byte (Read-only) - **Description**: Returns True if the inverse color style is set in the screen painter. ### DisplayedText - **Type**: String (Read-only) - **Description**: Returns the text as displayed on the screen, including preceding or trailing blanks. ### Highlighted - **Type**: Byte (Read-only) - **Description**: Returns True if the Highlighted flag is set in the screen painter. ### IsHotspot - **Type**: Byte (Read-only) - **Description**: Returns True if the label is configured to cause a round trip when clicked (hot spot). ### IsLeftLabel - **Type**: Byte (Read-only) - **Description**: Returns True if the label is assigned as the left label of another control. ### IsListElement - **Type**: Byte (Read-only) - **Description**: Returns True if the element is on an ABAP list rather than a dynpro screen. ### IsRightLabel - **Type**: Byte (Read-only) - **Description**: Returns True if the label is assigned as the right label of another control. ### MaxLength - **Type**: Long (Read-only) - **Description**: Returns the maximum text length of the label in code units. ### Numerical - **Type**: Byte (Read-only) - **Description**: Returns True if the label is restricted to numeric content. ### RowText - **Type**: String (Read-only) - **Description**: Available in ABAP list screens; returns the text of the entire line containing the component. ``` -------------------------------- ### GoNextBookMark Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Navigates to the line where the next none numbered bookmark is set. ```VBA Public Sub GoNextBookMark() ``` -------------------------------- ### ContextMenu Event Syntax Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Syntax definition for the ContextMenu event, triggered when a context menu is about to be displayed for GuiShell controls. ```VB Public Event ContextMenu( _ ByVal Session As GuiSession, _ ByVal Component As GuiVComponent _ ) ``` -------------------------------- ### GetAutoCompleteToolTipDelay Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns the number of milliseconds, which elapse between highlighting an entry in the autocomplete listbox and the appearance of the corresponding tooltip window. ```VBA Public Function GetAutoCompleteToolTipDelay() As Long ``` -------------------------------- ### Select context menu items in GuiShell Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/87c4e965ed4e402b982dc399e34526c7.html Methods for selecting items from a control's context menu using function codes, positions, or text labels. ```VBA Public Sub SelectContextMenuItem( _ ByVal FunctionCode As String _ ) ``` ```VBA Public Sub SelectContextMenuItemByPosition( _ ByVal PositionDesc As String _ ) ``` ```VBA Public Sub SelectContextMenuItemByText( _ ByVal Text As String _ ) ``` -------------------------------- ### PressToolbarButton Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Emulates clicking a button in the grid view toolbar. ```VBA Public Sub PressToolbarButton( _ ByVal Id As String _ ) ``` -------------------------------- ### SelectMenuItemByText Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/53a605dfd6b947a4a3399f48105eab17.html Emulates the selection of a menu item by its display text. ```VBA Public Sub SelectMenuItemByText( _ ByVal strText As String _ ) ``` -------------------------------- ### GetColumnTooltip Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Returns the tooltip text for the specified column. ```VBA Public Function GetColumnTooltip( _ ByVal Column As String _ ) As String ``` -------------------------------- ### Select Items Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/42597e94a6134dd4bd5fcab80d205798.html Selects items based on the provided string parameter. ```VBA Public Sub SelectItems( _ ByVal strItems As String _ ) ``` -------------------------------- ### GuiDockShell Object Properties Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/5074ad8cafcc488bbe1040c5bcd71385.html Documentation for specific properties available on the GuiDockShell object. ```APIDOC ## Property: AccDescription ### Description Accessibility description of the shell. This description can be used for shells that do not have a title element. ### Syntax Public Property AccDescription As String ### Access Read-only ## Property: DockerIsVertical ### Description Returns TRUE if the container is a vertical docker control. ### Syntax Public Property DockerIsVertical As Byte ### Access Read-only ## Property: DockerPixelSize ### Description Returns or sets the size of the docker control in pixels. ### Syntax Public Property DockerPixelSize As Long ### Access Read-write ``` -------------------------------- ### Highlighted Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/2e44c4f890524686977e9729565f7824.html Indicates if the Highlighted flag is set in the screen painter. ```VB Public Property Highlighted As Byte ``` -------------------------------- ### GuiTabStrip Object Properties Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/30628a569e3a49288a80c4d73e3de908.html The GuiTabStrip object provides several read-only properties to retrieve the dimensions and state of the tab strip. ```APIDOC ## GuiTabStrip Properties ### CharHeight (Read-only) - **Type**: Long - **Description**: Height of the GuiTabStrip in character metric. ### CharLeft (Read-only) - **Type**: Long - **Description**: Left coordinate of the GuiTabStrip in character metric. ### CharTop (Read-only) - **Type**: Long - **Description**: Top coordinate of the GuiTabStrip in character metric. ### CharWidth (Read-only) - **Type**: Long - **Description**: Width of the GuiTabStrip in character metric. ### LeftTab (Read-only) - **Type**: GuiTab - **Description**: The left-most tab whose caption is visible. ### SelectedTab (Read-only) - **Type**: GuiTab - **Description**: The currently selected tab whose descendants are visualized. ``` -------------------------------- ### Format Selected Lines Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Formats selected lines using Pretty Printer and current formatting settings. ```VBA Public Sub FormatSelectedLines() ``` -------------------------------- ### GoNumberedBookmark Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Navigates to the line where the bookmark numbered Mark resides. ```APIDOC ## Public Sub GoNumberedBookmark(ByVal Mark As Long) ### Description Navigates to the line where the bookmark numbered Mark resides. ``` -------------------------------- ### Click Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Emulates a mouse click on a specific cell. Raises an exception if parameters are invalid. ```VBA Public Sub Click( _ ByVal Row As Long, _ ByVal Column As String _ ) ``` -------------------------------- ### CharWidth Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/2e44c4f890524686977e9729565f7824.html Retrieves the width of the GuiLabel in character metric. ```VB Public Property CharWith As Long ``` -------------------------------- ### SelectMenuItem Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/53a605dfd6b947a4a3399f48105eab17.html Emulates the selection of a menu item using its ID. ```VBA Public Sub SelectMenuItem( _ ByVal Id As String _ ) ``` -------------------------------- ### Check for OTF preview Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/7892da6a9b83433583707d476207badf.html Indicates whether a SAPScript Preview Control is currently displayed in the user area. ```VBA Public Property IsOTFPreview As Byte ``` -------------------------------- ### GetListProperty Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/2a0e5efd9c8942b3848adad4389ef41c.html Retrieves a list property as a string. Refer to the GuiLabel object documentation for further details. ```VBA Public Function GetListProperty( _ ByVal Property As String _ ) As String ``` -------------------------------- ### GuiComboBoxEntry Object Properties Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/5f56d9ab42824d0195a6514988e688a0.html The GuiComboBoxEntry object exposes three read-only properties: Key, Pos, and Value. ```APIDOC ## GuiComboBoxEntry Object ### Description Represents an entry within a GuiComboBox or GuiComboBoxControl. ### Properties - **Key** (String) - Read-only. The key value of the combo box entry. - **Pos** (Long) - Read-only. The position of the combo box entry (1-based index). - **Value** (String) - Read-only. The display value of the combo box entry. ``` -------------------------------- ### DisplayedText Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/2e44c4f890524686977e9729565f7824.html Retrieves the text as displayed on the screen, including preceding or trailing blanks. ```VB Public Property DisplayedText As String ``` -------------------------------- ### SetWordWrapPosition Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Sets the number of columns to display before applying word wrap. ```VBA Public Sub SetWordWrapPosition( _ ByVal Pos As Long _ ) ``` -------------------------------- ### PressContextButton Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/53a605dfd6b947a4a3399f48105eab17.html Emulates a user click on the context button with the specified ID. ```VBA Public Sub PressContextButton( _ ByVal Id As String _ ) ``` -------------------------------- ### GetColorInfo Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Returns the description for the color of the cell. ```VBA Public Function GetColorInfo( _ ByVal Color As Long _ ) As String ``` -------------------------------- ### Navigate ABAP lists Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/7892da6a9b83433583707d476207badf.html Sends a navigation command to the SAP system for ABAP lists. Navigation only occurs if the current element and list support the specified command. ```VBA Public Sub ListNavigate( _ ByVal NavType As String _ ) ``` -------------------------------- ### SelectRange Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Highlights a region of text for selection. ```APIDOC ## SelectRange ### Description Highlights a region of text for selection. ### Signature Public Sub SelectRange(ByVal LineStart As Long, ByVal ColumnStart As Long, ByVal LineEnd As Long, ByVal ColumnEnd As Long) ``` -------------------------------- ### PressButton Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Emulates pressing a button in a specific cell. Raises an exception if the cell does not exist or does not contain a button. ```VBA Public Sub PressButton( _ ByVal Row As Long, _ ByVal Column As String _ ) ``` -------------------------------- ### PressColumnHeader Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Emulates a mouse click on a column header. Raises an exception if the column is invalid. ```VBA Public Sub PressColumnHeader( _ ByVal Column As String _ ) ``` -------------------------------- ### ProgressIndicator Event Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Provides progress updates. ```VBA Public Event ProgressIndicator( _ ByVal percentage As Long, _ ByVal Text As String _ ) ``` -------------------------------- ### Click Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Emulates a mouse click on a specific cell. ```APIDOC ## Click ### Description This function emulates a mouse click on a given cell if the parameters are valid and raises an exception otherwise. ### Signature `Public Sub Click(ByVal Row As Long, ByVal Column As String)` ### Parameters - **Row** (Long) - Required - The row index of the cell. - **Column** (String) - Required - The column identifier of the cell. ``` -------------------------------- ### SaveToFile Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Saves the editor content to a file. ```VBA Public Sub SaveToFile( _ ByVal p1 As String _ ) ``` -------------------------------- ### Change Event Syntax Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Syntax definition for the Change event, which reports UI element modifications during record mode. ```VB Public Event Change( _ ByVal Session As GuiSession, _ ByVal Component As GuiComponent, _ ByVal CommandArray As Variant _ ) ``` -------------------------------- ### SwapCase Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Inverts the case setting for the selected text. ```APIDOC ## SwapCase ### Description Inverts the case setting for the selected text. Upper case characters are switched to lower case and vice versa. ``` -------------------------------- ### GetAutoCompleteToolbarButtonToolTip Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns the index of the sub image associated with the auto complete entry specified in Index. Returns -1 if no sub image is associated. ```APIDOC ## Public Function GetAutoCompleteToolbarButtonToolTip(ByVal Index As Long) As String ### Description Returns the index of the sub image associated with the auto complete entry specified in Index. Returns -1 if no sub image is associated. ``` -------------------------------- ### GetToolbarButtonTooltip Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Returns the tooltip text for the specified toolbar button. ```VBA Public Function GetToolbarButtonTooltip( _ ByVal ButtonPos As Long _ ) As String ``` -------------------------------- ### FindByNameEx Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/76a8c4e46d1d4f8caa5f70b6dcfc5f34.html Returns the first descendant object matching the specified name and type, using the GuiComponentType enumeration. ```APIDOC ## FindByNameEx ### Description Works exactly like FindByName, but accepts the type parameter as a long integer from the GuiComponentType enumeration. ### Signature Public Function FindByNameEx(ByVal Name As String, ByVal Type As Long) As GuiComponent ### Parameters - **Name** (String) - The name of the component to search for. - **Type** (Long) - The type of the component as defined in GuiComponentType. ``` -------------------------------- ### CharHeight Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/2e44c4f890524686977e9729565f7824.html Retrieves the height of the GuiLabel in character metric. ```VB Public Property CharHeight As Long ``` -------------------------------- ### Activated Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Event triggered when a session is activated. ```APIDOC ## Event: Activated ### Signature Public Event Activated(ByVal Session As GuiSession) ``` -------------------------------- ### GetCurrentToolTipText Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Retrieves the text in the currently displayed code hint or autocomplete listbox tooltip window. ```APIDOC ## Public Function GetCurrentToolTipText() As String ### Description Retrieves the text in the currently displayed code hint or autocomplete listbox tooltip window. Multiple lines are separated with \n characters. ``` -------------------------------- ### FindAllByNameEx Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/76a8c4e46d1d4f8caa5f70b6dcfc5f34.html Returns a collection of all descendant objects matching the specified name and type, using the GuiComponentType enumeration for the type parameter. ```APIDOC ## FindAllByNameEx ### Description Works exactly like FindAllByName, but accepts the type parameter as a long integer from the GuiComponentType enumeration. ### Signature Public Function FindAllByNameEx(ByVal Name As String, ByVal Type As Long) As GuiComponentCollection ### Parameters - **Name** (String) - The name of the component to search for. - **Type** (Long) - The type of the component as defined in GuiComponentType. ``` -------------------------------- ### SelectRange Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Highlights a specific region of text for selection. ```VBA Public Sub SelectRange( _ ByVal LineStart As Long, _ ByVal ColumnStart As Long, _ ByVal LineEnd As Long, _ ByVal ColumnEnd As Long _ ) ``` -------------------------------- ### SwapCase Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Inverts the case of selected text, switching upper case to lower and vice versa. ```VBA Public Sub SwapCase() ``` -------------------------------- ### Select() Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/12c0aa53e9bc4912a6729683ac39ec8d.html Selects the radio button. Selecting a radio button automatically deselects all other buttons within the same group, which may trigger a server roundtrip. ```APIDOC ## Select() ### Description Selects the radio button. Selecting a radio button automatically deselects all other buttons within the same group, which may trigger a server roundtrip. ### Syntax Public Sub Select() ``` -------------------------------- ### Sentencize Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Converts text to sentence case, where sentences are delimited by periods. ```VBA Public Sub Sentencize() ``` -------------------------------- ### CustomEvent Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/0484ad043f144233ba259b328c1338de.html Sends a custom event to the server for a specified document. ```VBA Public Sub CustomEvent( _ ByVal Cookie As Long, _ ByVal EventName As String, _ ByVal ParamCount As Long, _ Optional ByVal Par1 As Variant, _ Optional ByVal Par2 As Variant, _ Optional ByVal Par3 As Variant, _ Optional ByVal Par4 As Variant, _ Optional ByVal Par5 As Variant, _ Optional ByVal Par6 As Variant, _ Optional ByVal Par7 As Variant, _ Optional ByVal Par8 As Variant, _ Optional ByVal Par9 As Variant, _ Optional ByVal Par10 As Variant, _ Optional ByVal Par11 As Variant, _ Optional ByVal Par12 As Variant _ ) ``` -------------------------------- ### SelectBlockRange Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Highlights a region of text in block mode. ```APIDOC ## SelectBlockRange ### Description Highlights a region of text in block mode for selection. Equivalent to holding down the ALT key while dragging the mouse over the text. ### Signature Public Sub SelectBlockRange(ByVal LineStart As Long, ByVal ColumnStart As Long, ByVal LineEnd As Long, ByVal ColumnEnd As Long) ``` -------------------------------- ### AutomationFCode Event Syntax Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Syntax definition for the AutomationFCode event, which notifies listeners of function codes executed by the SAP Workplace framework. ```VB Public Event AutomationFCode( _ ByVal Session As GuiSession, _ ByVal FunctionCode As String _ ) ``` -------------------------------- ### PressTotalRowCurrentCell Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Attempts to press the expansion button on the current cell. ```VBA Public Sub PressTotalRowCurrentCell() ``` -------------------------------- ### GetWordWrapMode Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns an integer corresponding to the currently set Word wrap mode. ```APIDOC ## Public Function GetWordWrapMode() As Long ### Description Returns an integer corresponding to the currently set Word wrap mode: 0 - Word wrap disabled, 1 - Wrap at edge of window, 2 - Wrap by page width, 3 - Wrap by page width inserting hard break. ``` -------------------------------- ### AbapScriptingEvent Syntax Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Syntax definition for the AbapScriptingEvent. ```VB Public Event AbapScriptingEvent( _ ByVal param As String _ ) ``` -------------------------------- ### RightLabel Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/60579254b8914b699dd2c681e8eb1b79.html Returns the right label component assigned via the Screen Painter. ```VBA Public Property RightLabel As GuiVComponent ``` -------------------------------- ### GetUndoPosition Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns the current position of the document in the undo/redo buffer. ```APIDOC ## Public Function GetUndoPosition() As Long ### Description Returns the current position of the document in the undo/redo buffer. ``` -------------------------------- ### ButtonCount Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/53a605dfd6b947a4a3399f48105eab17.html Retrieves the total number of toolbar buttons. ```APIDOC ## Public Property ButtonCount As Long ### Description The number of toolbar buttons including separators. ``` -------------------------------- ### SelectionChanged Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Notifies the server that the selection has changed. ```VBA Public Sub SelectionChanged() ``` -------------------------------- ### GetUndoPosition Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns the current position of the document in the undo/redo buffer. ```VBA Public Function GetUndoPosition() As Long ``` -------------------------------- ### FindAllByNameEx Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/76a8c4e46d1d4f8caa5f70b6dcfc5f34.html Similar to FindAllByName, but accepts the type parameter as a long integer from the GuiComponentType enumeration. ```VBA Public Function FindAllByNameEx( _ ByVal Name As String, _ ByVal Type As Long _ ) As GuiComponentCollection ``` -------------------------------- ### IsRightLabel Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/60579254b8914b699dd2c681e8eb1b79.html Indicates if the component has the 'assign right' flag set. ```VBA Public Property IsRightLabel As Byte ``` -------------------------------- ### Change Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/3075476b6f834449a090411ee3bbbfb4.html Raised in record mode when changes to UI elements are collected before server communication. ```APIDOC ## Event: Change ### Signature Public Event Change(ByVal Session As GuiSession, ByVal Component As GuiComponent, ByVal CommandArray As Variant) ``` -------------------------------- ### PressButton Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Emulates pressing a button located in a specific cell. ```APIDOC ## Public Sub PressButton(ByVal Row As Long, ByVal Column As String) ### Description This function emulates pressing a button placed in a given cell. It will raise an exception if the cell does not contain a button, or does not even exist. ``` -------------------------------- ### IsStepLoop Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/2a0e5efd9c8942b3848adad4389ef41c.html Indicates if the container is a step loop container. ```VBA Public Property IsStepLoop As Byte ``` -------------------------------- ### Undo Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Performs an undo or redo operation based on the provided buffer position. ```VBA Public Sub Undo( _ ByVal UndoPosition As Long _ ) ``` -------------------------------- ### DoubleClick Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/42597e94a6134dd4bd5fcab80d205798.html Emulates a mouse double click on the specified ID. ```APIDOC ## DoubleClick ### Description This function emulates a mouse double click. ### Syntax Public Sub DoubleClick(ByVal strId As String) ``` -------------------------------- ### PromptText Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/254da14a88074b17b14ac0a0b6aff45f.html Read-only property containing the prompt text displayed in an empty input field. ```VBA Public Property PromptText As String ``` -------------------------------- ### GetButtonTooltip Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/53a605dfd6b947a4a3399f48105eab17.html Returns the tooltip text associated with the specified toolbar button. ```VBA Public Function GetButtonTooltip( _ ByVal ButtonPos As Long _ ) As String ``` -------------------------------- ### Move Line Up Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Swaps the current line with the line above it. ```VBA Public Sub MoveLineUp() ``` -------------------------------- ### Move Cursor to Line Home Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Positions the cursor in the first column of the current line. ```VBA Public Sub MoveCursorLineHome() ``` -------------------------------- ### HistoryList Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Retrieves the list of input history entries for the specified cell as a GuiCollection. ```VBA Public Function HistoryList( _ ByVal Row As Long, _ ByVal Column As String _ ) As GuiCollection ``` -------------------------------- ### SetDocument Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/0484ad043f144233ba259b328c1338de.html Replaces or adds a new document with the specified index. ```APIDOC ## SetDocument ### Description This function replaces or adds a new document with the specified index. The parameter document is the base64-representation of the binary document. ### Syntax Public Sub SetDocument(ByVal Index As Long, ByVal Document As String) ``` -------------------------------- ### GetWordWrapMode Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns an integer corresponding to the currently set Word wrap mode. ```VBA Public Function GetWordWrapMode() As Long ``` -------------------------------- ### ToggleCapsLock Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Switches the caps lock state on or off. ```VBA Public Sub ToggleCapsLock() ``` -------------------------------- ### TransposeLine Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Swaps the current line with the line above it. ```VBA Public Sub TransposeLine() ``` -------------------------------- ### Check for Standard Bookmark Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns True if the line is bookmarked with a standard non-numbered bookmark. ```VBA Public Function IsBookmark( _ ByVal Line As Long _ ) As Byte ``` -------------------------------- ### SelectContextMenuItemByText Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/87c4e965ed4e402b982dc399e34526c7.html Selects a menu item of a context menu using the text of the item and possible higher level menus. ```APIDOC ## SelectContextMenuItemByText ### Description Select a menu item of a context menu using the text of the item and possible higher level menus. ### Signature Public Sub SelectContextMenuItemByText(ByVal Text As String) ``` -------------------------------- ### GetAutoCompleteToolbarButtonToolTip Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns the index of the sub image associated with the auto complete entry specified in Index. Returns -1 if no sub image is associated. ```VBA Public Function GetAutoCompleteToolbarButtonToolTip( _ ByVal Index As Long _ ) As String ``` -------------------------------- ### Check Code Hints Status Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns True if code hints are currently enabled. ```VBA Public Function CodeHintsEnabled() As Byte ``` -------------------------------- ### UpperCase Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Forces selected text into upper case. ```APIDOC ## UpperCase ### Description Forces selected text into upper case. ``` -------------------------------- ### GetHTMLClipboardContents Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Returns a string containing the current contents of the clipboard in HTML format. Returns an empty string if the clipboard does not contain anything in HTML format. ```VBA Public Function GetHTMLClipboardContents() As String ``` -------------------------------- ### SetOverwriteMode Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Switches between Insert and Overwrite modes. True enables Overwrite mode. ```VBA Public Sub SetOverwriteMode( _ ByVal Status As Byte _ ) ``` -------------------------------- ### GoNumberedBookmark Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Navigates to the line where the bookmark numbered Mark resides. ```VBA Public Sub GoNumberedBookmark( _ ByVal Mark As Long _ ) ``` -------------------------------- ### DoubleClick Method Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Emulates a mouse double-click on a specific cell. Raises an exception if parameters are invalid. ```VBA Public Sub DoubleClick( _ ByVal Row As Long, _ ByVal Column As String _ ) ``` -------------------------------- ### SelectContextMenuItemByPosition Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/87c4e965ed4e402b982dc399e34526c7.html Selects a context menu item using its position, making it independent of the menu item text. ```APIDOC ## SelectContextMenuItemByPosition ### Description This method allows you to select a context menu item using the position of the item. It is therefore independent of the menu item text. ### Signature Public Sub SelectContextMenuItemByPosition(ByVal PositionDesc As String) ``` -------------------------------- ### TransposeLine Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Swaps the current line with the line above. ```APIDOC ## TransposeLine ### Description Swaps the contents of the line where the cursor currently resides with the contents of the line above the current cursor position. ``` -------------------------------- ### SetWordWrapPosition Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/06d283b024964f689fdf55ea1f2bd0d9.html Sets the number of columns to be displayed before word wrap is applied. ```APIDOC ## SetWordWrapPosition ### Description Specifies the number of columns to be displayed before word wrap is applied. ### Parameters - **Pos** (Long) - Required - The number of columns before word wrap. ``` -------------------------------- ### GetSymbolInfo Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/4af24c3281fb4d6a809e53238562d3b2.html Returns the description for the symbol in the cell. ```APIDOC ## GetSymbolInfo ### Description Returns the description for the symbol in the cell. ### Signature Public Function GetSymbolInfo(ByVal Symbol As String) As String ``` -------------------------------- ### LeftLabel Property Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/60579254b8914b699dd2c681e8eb1b79.html Returns the left label component assigned via the Screen Painter. ```VBA Public Property LeftLabel As GuiVComponent ``` -------------------------------- ### Access GuiShell properties Source: https://help.sap.com/docs/sap_gui_for_windows/b47d018c3b9b45e897faf66a6c0885a8/87c4e965ed4e402b982dc399e34526c7.html Properties for retrieving accessibility information, drag-and-drop capabilities, window handles, ActiveX events, and sub-type identification. ```VBA Public Property AccDescription As String ``` ```VBA Public Property DragDropSupported As Byte ``` ```VBA Public Property Handle As Long ``` ```VBA Public Property OcxEvents As GuiCollection ``` ```VBA Public Property SubType As String ```