|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Open and print web documentopen a web page: Dim psi As New ProcessStartInfo() With psi .FileName = "iexplore" .Arguments = "-new http://dotnet.mvps.org/" End With Process.Start(psi) Next, I need to be able to print the web page that is opened programatically and hidden from the user. So I tried this, but it errors every time: Dim psi As New ProcessStartInfo() With psi .Verb = "print" .WindowStyle = ProcessWindowStyle.Hidden .FileName = "iexplore" .Arguments = "-new http://dotnet.mvps.org/" .UseShellExecute = True End With Process.Start(psi) The error I receive is: An unhandled exception of type 'System.ComponentModel.Win32Exception' occurred in system.dll Additional information: No application is associated with the specified file for this operation. Please help! Thank you, Wendy
Show quote
Hide quote
"Wendy" <We***@discussions.microsoft.com> schrieb Verb "print" requires a file to print. You can not print "iexplore.exe". > I read Herfried Wagner's code from 12/05. I can get the following > to work to open a web page: > Dim psi As New ProcessStartInfo() > With psi > .FileName = "iexplore" > .Arguments = "-new http://dotnet.mvps.org/" > End With > Process.Start(psi) > > Next, I need to be able to print the web page that is opened > programatically and hidden from the user. So I tried this, but it > errors every time: Dim psi As New ProcessStartInfo() > With psi > .Verb = "print" > .WindowStyle = ProcessWindowStyle.Hidden > .FileName = "iexplore" > .Arguments = "-new http://dotnet.mvps.org/" > .UseShellExecute = True > End With > Process.Start(psi) > > The error I receive is: > An unhandled exception of type > 'System.ComponentModel.Win32Exception' occurred in system.dll > Additional information: No application is associated with the > specified file for this operation. Sorry, I don't hve a solution. Armin
Search Arraylist in Arraylist.
Newbie Question: How To Open A File Non-Exclusively? PropertyBag in VB.NET? Saving a Database to Disk Windows Form Application Help PostMessage and Combobox Question about Control Collection in VB.net Command line argument in NET Cast from string "" to type 'Date' is not valid Accessing controls from another thread |
|||||||||||||||||||||||