On StackOverflow, a questioner wanted something similar for Word. One can also imagine a future question wanted similar for PowerPoint. Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" _ (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" _ (ByVal hWnd1 As Long, ByVal hwnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _ '* Windows API function to traverse windows and grab attributes However, I wanted to share the meta code because yet another use case may turn up in the future.Ĭode to reach all those three applications via their windows handles are in the previous post. '* Windows API function to get IDispatch COM pointer via Accessibility interface (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
0 Comments
Leave a Reply. |