Article ID: 164735
Article Last Modified on 10/11/2006
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As Long) As Long
Sub GetWindowHandle()
Dim hwnd As Long
' Call the FindWindow API; this API returns a window handle.
hwnd = FindWindow("PP97FrameClass", 0&)
' Check if you were able to obtain the Window handle.
If hwnd <> 0 Then
' If hwnd not zero a window handle was obtained.
MsgBox "Successfully obtained Window Handle (HWND) for " _
& "PowerPoint.", vbInformation, "Got Handle"
Else
MsgBox "Could not obtain Window Handle (HWND) for PowerPoint.", _
vbInformation, "Failed To Get Handle"
End If
End Sub
163435 VBA: Programming Resources for Visual Basic for Applications
Additional query words: 97 8.00 kbmacro kbpptvba ppt8 vba vbe ppt97
Keywords: kbcode kbdtacode kbhowto kbmacro kbprogramming KB164735