Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Need Help in Printing

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 180
Default Need Help in Printing

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Need Help in Printing


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
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
Excel 2003 printing problem--printing 1 document on 2 pages Bons Excel Discussion (Misc queries) 0 December 24th 09 04:15 PM
Excel Printing --Borders are not printing on the same page as data Stup88 Excel Discussion (Misc queries) 1 August 7th 07 09:34 AM
Printing a heading on each new page when printing Brian Excel Discussion (Misc queries) 3 November 15th 06 05:22 PM
Enable Double sided printing contiuously when printing multiple s. Lee Excel Discussion (Misc queries) 1 November 27th 04 01:58 AM
Printing? Worksheets not printing the same on multiple pc's! 43fan Excel Programming 2 April 29th 04 02:34 PM


All times are GMT +1. The time now is 07:34 PM.

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"