The code below used to work but is now throwing the following error:
'Trying to revoke a drop target that has not been registered'.
//Code Start
WebBrowser1.Navigate strFilePath
' stall logic here to allow browser to navigate to
' file (strfilepath is the location of the file)
WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0
' this is where the error is thrown.
// Code End
Value of OLECMDID_PRINT is 6
Value of OLECMDEXECOPT_DONTPROMPTUSER is 2
Anoter site suggested to try the following code:
// Code Start
Do While WebBrowser1.QueryStatusWB(OLECMDID_PRINT) <> OLECMDF_SUPPORTED + OLECMDF_ENABLED
DoEvents
Loop
// Code End
The problem is that OLECMDID_Print will never equal
(OLECMDF_SUPPORTED + OLECMDF_ENABLED).
They are all constant values. 6 will never equal 1 + 2
Thanks in advance for any help.
Regards,
Keith
'Trying to revoke a drop target that has not been registered'.
//Code Start
WebBrowser1.Navigate strFilePath
' stall logic here to allow browser to navigate to
' file (strfilepath is the location of the file)
WebBrowser1.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_DONTPROMPTUSER, 0, 0
' this is where the error is thrown.
// Code End
Value of OLECMDID_PRINT is 6
Value of OLECMDEXECOPT_DONTPROMPTUSER is 2
Anoter site suggested to try the following code:
// Code Start
Do While WebBrowser1.QueryStatusWB(OLECMDID_PRINT) <> OLECMDF_SUPPORTED + OLECMDF_ENABLED
DoEvents
Loop
// Code End
The problem is that OLECMDID_Print will never equal
(OLECMDF_SUPPORTED + OLECMDF_ENABLED).
They are all constant values. 6 will never equal 1 + 2
Thanks in advance for any help.
Regards,
Keith