Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I need some help in a couple of things, hope you could help me. 1º I need to print a word document from excel, and the document is in the same dir as the excel file. 2º I want to print a list of items and if it passes the two page count it automatically sets up the second page with the same header row as the first one. All this in VBA code. with a button on a different sheet. Thank you for your attention Pedro |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No idea about item 1.
As for 2, you can record the step in PageSetup whereby you indicate that row 1 should be repeated on every page printed: With ActiveSheet.PageSetup .PrintTitleRows = "$1:$1" End With "Pedro" wrote: Hi I need some help in a couple of things, hope you could help me. 1º I need to print a word document from excel, and the document is in the same dir as the excel file. 2º I want to print a list of items and if it passes the two page count it automatically sets up the second page with the same header row as the first one. All this in VBA code. with a button on a different sheet. Thank you for your attention Pedro |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, You may solve your first problem with following lines of code. Sub print_doc() Dim obj As New Word.Application Set obj = New Word.Application obj.Visible = True Documents.Open " File path " ActiveDocument.PrintOut Range:=wdPrintCurrentPage (Optional parameter) End Sub Before trying this code, do not forget to add reference of MS Word Object library. For other assistance mail to my personal id. -- gajendra_vba ------------------------------------------------------------------------ gajendra_vba's Profile: http://www.excelforum.com/member.php...o&userid=29935 View this thread: http://www.excelforum.com/showthread...hreadid=496581 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 printing problem--printing 1 document on 2 pages | Excel Discussion (Misc queries) | |||
Excel Printing --Borders are not printing on the same page as data | Excel Discussion (Misc queries) | |||
Printing a heading on each new page when printing | Excel Discussion (Misc queries) | |||
Enable Double sided printing contiuously when printing multiple s. | Excel Discussion (Misc queries) | |||
Printing? Worksheets not printing the same on multiple pc's! | Excel Programming |