Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general,microsoft.public.office.developer.vba,microsoft.public.windows.inetexplorer.ie6.browser
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general,microsoft.public.office.developer.vba,microsoft.public.windows.inetexplorer.ie6.browser
|
|||
|
|||
![]()
Sorry that header should read as above
Dave F. wrote: 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. |
#3
![]()
Posted to microsoft.public.excel.programming,microsoft.public.word.vba.general,microsoft.public.office.developer.vba,microsoft.public.windows.inetexplorer.ie6.browser
|
|||
|
|||
![]()
I think you might get additional advice asking in the VS2005 groups and
places like http://www.codeproject.com/ in case someone has already tried the same idea. Even if they used a different "Language" you may get some good clues. Sorry not to be more directly helpful but I think you may be right about some drivers being specific. "Dave F." wrote in message ... Sorry that header should read as above Dave F. wrote: 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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Number Format on Excel File saved from .html file | Excel Discussion (Misc queries) | |||
Reading & manipulating the Excel data programatically in C# progra | Excel Programming | |||
Front Page- Excel To Html Printing | Excel Discussion (Misc queries) | |||
C:\Progra~/MI1933~1\Office\SETUP\Off97std.stf is missing or corru. | Setting up and Configuration of Excel | |||
swf flash file embedded in html file which is edited in excel.. he | Excel Discussion (Misc queries) |