SHDocVw's execwb method printing additional garbase/junk text on ie9 installed machine


  • Hi, I am facing very strange problem while printing report thru execwb method of SHDocVw.InternetExplorer interface, it was working fine untill i upgraded ie8 to ie9, but asa upgraded to ie9 it started print some junk character(A'A'A'A') in report, I tried many solution istead of execwb method tried with Webbrowser.Print method also but all are in vein, same issue resurfaced again and again, application is printing fine below ie9 verion but on ie9 its started printing some junk/garbase character.

    for execwb methos i took reference of Interop.SHDocvw.dll
    Development Environment - .Net 2.0,
    Deploy Environment: - ie9 with windows 7


    My Code is below

      SHDocVw.InternetExplorer ieApp = null;
             object objUnknown = new System.Runtime.InteropServices.UnknownWrapper(null);
                    ieApp = new SHDocVw.InternetExplorerClass();

                    object noValue1 = null;
                    object noValue2 = null;
                    object noValue3 = null;
                    object noValue4 = null;
                    object noValue5 = null;
                    object noValue6 = null;
                    object COMNothing = null;

                    COMNothing = new System.Runtime.InteropServices.UnknownWrapper(null);

                    noValue1 = COMNothing;
                    noValue2 = COMNothing;
                    noValue3 = COMNothing;
                    noValue4 = COMNothing;
                    noValue5 = COMNothing;
                    noValue6 = COMNothing;

                    ieApp.Navigate(URL, ref noValue1, ref noValue2, ref noValue3, ref noValue4);
                    while (ieApp.ReadyState != SHDocVw.tagREADYSTATE.READYSTATE_COMPLETE)
                        OLECMDF status = ieApp.QueryStatusWB(OLECMDID.OLECMDID_PRINT);

                        ieApp.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER, ref noValue5, ref noValue6);
                        int count = 100;
                        while (count-- > 0)
                            Debug_Log.Log(4, "N", "CreateBrowser", "Sleep");

    Can you please let me know if you have any solution, any type of suggestion is most welcomed



    27. dubna 2012 6:20

Všechny reakce