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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing from Excel to an HTML file

Status
Not open for further replies.

jmueller

MIS
Oct 9, 2001
57
US
Hello everyone,

I have a couple macros in excel that prints a specified range of rows/cells to a printer and then prints the same range to an html file. The "printer" version prints at 85% (per the Page Setup) and prints on one page. The problem is that the HTML file DOES NOT print on one page. I cannot seem to do anything from within Internet Explorer to get it all to print on one page. Is there anything I can do within my excel macro? Are there any parameters I could include to get the printing to the html file to condense the printing so as to fit on one page?

Here are the 2 macros:

**********************************
* This macro prints to the printer
**********************************
ActiveSheet.Range("A1:R41").PrintOut Copies:=1

************************************
* This macro prints to the HTML file
************************************
Sub Cre8Html()

Range("A1:R41").Select
With ActiveWorkbook.PublishObjects.Add(xlSourceRange, _
Worksheets("dir_flag").Range("B4")
& "\current\press\" & ActiveSheet.Name, ActiveSheet.Name, "$A$1:$R$41" _
, xlHtmlStatic, "press_sched_12508", "")
.Publish (True)
End With

End Sub
*************************************************



I hope this is all understandable...

Thank You very much for any help you can offer me.

Sincerely,
Jack
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top