Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
ExecuteExcel4Macro("GET.DOCUMENT(50)")
Is suppose to provide the number of pages to be printed. I have the following code that reprecents two pages to print it the above code says it is just one. Sub PrintDirect() Sheets("DIRECT").Select Application.Run "'RCA_RB3 06-122-S2 all crafts_rev 2 WBU macros.xls'!Enlarge" Application.Run "'RCA_RB3 06-122-S2 all crafts_rev 2 WBU macros.xls'!ReduceDir" ActiveSheet.ResetAllPageBreaks ActiveSheet.PageSetup.PrintArea = "$B$1:$N$199" With ActiveSheet.PageSetup .CenterHorizontally = True .Orientation = xlLandscape .FitToPagesWide = 1 End With Range("H1").Select ' MsgBox ExecuteExcel4Macro("GET.DOCUMENT(50)") & " pages will be printed." If ExecuteExcel4Macro("GET.DOCUMENT(50)") = 1 Then Application.Run "PrintPage" Else Rows("59:59").Select Range("B59").Activate ActiveWindow.SelectedSheets.HPageBreaks.Add Befo=ActiveCell Application.Run "PrintPage" End If End Sub This worked for me before and now it doesn't. Anyone know why? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
"Document not saved" "error in loading DLL" | Excel Discussion (Misc queries) | |||
How do I move a document from "recent items" to "documents" | New Users to Excel | |||
ExecuteExcel4Macro "SET.PRINT.AREA" Syntax | Excel Programming | |||
Retrieving info from "child" to a "parent" document | Excel Discussion (Misc queries) | |||
Solution "Your changes could not be saved" "The document may be read-only or encrypted" | Excel Discussion (Misc queries) |