Jim...I need help...mental help!!!
Jim (or anyone else who knows),
I found this post when I was parousing for answers to my post that is gaining much publicity.
So, I can get the Hwnd (the first parameter for the AccessibleObjectFromWindow sub, but what about the next three parameters?
So that you don't have to read all of the other post, let me summarize. I am opening an instance of ie, and performing an execWB function to print out the web page. I am opening a printer settings dialog box (on purpose) when I execute the print, and I want to set a reference to the dialog box, and I have the handle.
Thanks in advance for the help.
...let me expand just a little bit
Once I set a project reference to prndialog.dll (from Microsoft), I'd like to be able to do this:
dim prn as PrinterDlg
set prn = PrinterSettingsDialogBox that is already open.
New try, different error...
Code:
Private Sub PrintHTML()
Dim i As Integer
Dim xHwnd As Long
Dim objIE As InternetExplorer
Dim status As Variant
Set objIE = New InternetExplorer
objIE.Visible = True
objIE.Navigate2 "C:\temp\test.html"
objIE.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER
For i = 0 To 1000
Next
xHwnd = FindWindow(vbNullString, "Print")
status = AccessibleObjectFromWindow(xHwnd, 0, 0, VarPtr(varMe))
End Sub
I am now getting a runtimer error '49' - Bad DLL Calling Convention. My problem is the third parameter...I am sure of it. I don't know what I need to be passing in for the riid.