Click here to Skip to main content
15,913,115 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralOLE Databinding Pin
Milancie7-Aug-03 10:01
Milancie7-Aug-03 10:01 
GeneralRe: OLE Databinding Pin
pxw16-Aug-03 6:38
pxw16-Aug-03 6:38 
Generalaccess to outlook inbox Pin
pnpfriend7-Aug-03 9:45
pnpfriend7-Aug-03 9:45 
GeneralRe: access to outlook inbox Pin
Dave Kreskowiak8-Aug-03 4:20
mveDave Kreskowiak8-Aug-03 4:20 
GeneralRe: access to outlook inbox Pin
pnpfriend8-Aug-03 5:39
pnpfriend8-Aug-03 5:39 
GeneralRe: access to outlook inbox Pin
Dave Kreskowiak8-Aug-03 11:46
mveDave Kreskowiak8-Aug-03 11:46 
GeneralRe: access to outlook inbox Pin
pnpfriend10-Aug-03 4:18
pnpfriend10-Aug-03 4:18 
GeneralRe: access to outlook inbox Pin
pnpfriend10-Aug-03 4:57
pnpfriend10-Aug-03 4:57 
Hi..
I have the following code
<br />
        Dim ie As New SHDocVw.InternetExplorer<br />
        ie = CreateObject("InternetExplorer.Application")<br />
<br />
        With ie<br />
            .Visible = False<br />
            .Navigate("c:\OutLookStyle.html")<br />
            .ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT, SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER) 'printing the file without showing the print dialog<br />
            System.Threading.Thread.Sleep(5000)   'pausing the application to finish printing<br />
        End With<br />
        ie.Quit()


But i'm getting the following error whenever the project execute
.ExecWB(....)
An unhandled exception of type 'System.Runtime.InteropServices.COMException' occurred in emailPrint.exe

Additional information: Trying to revoke a drop target that has not been registered

(OR)

An error has occurred in the script o this page
Line: 288
Char: 1
Error: 'dialogArguments.__IE_PrintType' is null or not an object
Code: 0
URL: res://c:\\windows\system32\shdoclc.dll/priview.dlg

Do you want to continue running scripts on this page? Yes/No?



But I have no problem or whatsoever, if I debug and put a breakline on .ExecWB(..). the html page get printed without showing printdialog as I excepted. If I dont have a breakline at .ExecWB(..) then I got either or both of above errors( in red )


what would be the reason of getting such errors? and How can i print the web page to printer without showing PrintDialog???
Generalprinting to the printer with vb.net Pin
yulyos7-Aug-03 6:04
yulyos7-Aug-03 6:04 
GeneralRe: printing to the printer with vb.net Pin
pnpfriend7-Aug-03 10:21
pnpfriend7-Aug-03 10:21 
GeneralRe: printing to the printer with vb.net Pin
yulyos7-Aug-03 20:57
yulyos7-Aug-03 20:57 
GeneralRe: printing to the printer with vb.net Pin
pnpfriend8-Aug-03 5:50
pnpfriend8-Aug-03 5:50 
GeneralRe: printing to the printer with vb.net Pin
yulyos8-Aug-03 6:06
yulyos8-Aug-03 6:06 
GeneralRe: printing to the printer with vb.net Pin
pnpfriend8-Aug-03 8:48
pnpfriend8-Aug-03 8:48 
GeneralRetreving an auto number field from Access Pin
GrGonzo6-Aug-03 13:50
GrGonzo6-Aug-03 13:50 
GeneralRe: Retreving an auto number field from Access Pin
Bo Hunter7-Aug-03 14:32
Bo Hunter7-Aug-03 14:32 
GeneralPossible Vb Question Pin
droesch6-Aug-03 7:06
droesch6-Aug-03 7:06 
GeneralRe: Possible Vb Question Pin
RichardGrimmer18-Aug-03 4:07
RichardGrimmer18-Aug-03 4:07 
GeneralExtremly stupid VBA question Pin
Harald Krause6-Aug-03 1:17
Harald Krause6-Aug-03 1:17 
GeneralRe: Extremly stupid VBA question Pin
MrGee6-Aug-03 14:00
MrGee6-Aug-03 14:00 
GeneralRe: Extremly stupid VBA question Pin
RichardGrimmer18-Aug-03 4:08
RichardGrimmer18-Aug-03 4:08 
GeneralRe: Extremly stupid VBA question Pin
Nick Seng6-Aug-03 15:49
Nick Seng6-Aug-03 15:49 
GeneralADODB recordset Pin
_crs_6-Aug-03 0:41
_crs_6-Aug-03 0:41 
GeneralRe: ADODB recordset Pin
RichardGrimmer18-Aug-03 4:10
RichardGrimmer18-Aug-03 4:10 
GeneralVB.Net- C# integration Pin
Madhuri Mittal5-Aug-03 23:27
Madhuri Mittal5-Aug-03 23:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.