SHDocVw.InternetExplorer: DocComplete error
-
22 Februari 2012 22:37
Hi,
I would like to ask a question with InternetExplorer object.
I read that there are two common control used for automating browsing: InternetExplorer and WebBrowser. Both controls use DocumentComplete event to indicate the finishing of downloading all frames.
For WebBrowser control, there is an article How To Determine When a Page Is Done Loading in WebBrowser Control. The VB code is
Private Sub WebBrowser1_DocumentComplete(ByVal pDisp As Object, URL As Variant) If (pDisp Is WebBrowser1.Object) Then Debug.Print "Web document is finished downloading" End If End SubHowever, I didn't find the above work for my VSTO 2010 Excel document-level project using InternetExplorer object.
Could anyone instruct me how I should modify the code?
Bob
- Diedit oleh Bob Sun 22 Februari 2012 22:37
Semua Balasan
-
23 Februari 2012 1:44I think you need to compare the return value of Marshal.GetIDispatchForObject for the event source as well as the webbrowser.
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP