Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open internet explorer, print the contents and close internet explorer

Status
Not open for further replies.

Per9922

IS-IT--Management
Oct 1, 2004
74
SE
Hello all,

I really ned the help from you! This is what I want to do:

1) Open internet explorer with a html file
2) Print the html file
3) Close the internet explorer

Or can I print the html file direct ?

I have manage to do set 1 with this code:

Dim objExplorer
Set objExplorer = CreateObject("InternetExplorer.Application")
objExplorer.Visible = True
objExplorer.ToolBar = False
objExplorer.StatusBar = False
objExplorer.Navigate "about:blank"
objExplorer.Document.Open

Please help!
Per
 
Hello Per,

Try this code.
Code:
Set oShell = CreateObject("Shell.Application")

Set oFile = oShell.NameSpace("Path of the folder where the your html is.").ParseName("Your html file name.")

oFile.InvokeVerb("Print")

-jkspeed

 
Thanks jkspeed!

I will try it tomorrow. Do you know how to in landscape ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top