LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general,microsoft.public.office.developer.vba,microsoft.public.windows.inetexplorer.ie6.browser
external usenet poster
 
Posts: 6
Default printing a html file progra

Hi
I'm using Office '03.

I've a couple of Q's regarding printing...

I've written a routine that copies the code from the vbe & converts it t
o html. I've then saved it to a file (test.htm).

1. What's the best way to print this file? I've found this routine
that loads it into an IE object:

Sub PrintHtml(fileName)
Dim objIE
Set objIE = wscript.CreateObject("InternetExplorer.Application ", "ie_")
objIE.Visible = True
objIE.Navigate fileName
Do Until objIE.readyState = 4: wscript.sleep 20: Loop
print_done = False
' 6 = PRINT, 2 = NO USER PROMPT
objIE.ExecWB 6, 2
' Wait until printing id done.
Do While Not print_done: wscript.sleep 50: Loop
objIE.Quit
End Sub

I've never used ExecWB before. Is this the best way?

Is there a way to print the output of the file (not the source code)
without saving it to disk?

2. When printing is there a way to programmatically set the printer
driver properties. Specifically the option to print 2 pages on 1 sheet.
I'm guessing the drivers are manufacturer specific & have no idea how to
do this.

Your help would be much appreciated.

Cheers
Dave F.
Please note the email is cross posted to relevant multiple NG's to
obtain the quickest,most accurate answer.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Number Format on Excel File saved from .html file joyfulone Excel Discussion (Misc queries) 3 April 15th 09 12:07 AM
Reading & manipulating the Excel data programatically in C# progra Rp007 Excel Programming 0 October 9th 06 05:21 PM
Front Page- Excel To Html Printing Liane Excel Discussion (Misc queries) 0 July 19th 06 10:31 PM
C:\Progra~/MI1933~1\Office\SETUP\Off97std.stf is missing or corru. LaChapelle4d Setting up and Configuration of Excel 1 November 6th 05 01:12 AM
swf flash file embedded in html file which is edited in excel.. he I Believe Excel Discussion (Misc queries) 0 June 16th 05 10:06 PM


All times are GMT +1. The time now is 06:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"