LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default ExecuteExcel4Macro("GET.DOCUMENT(50)")

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
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
"Document not saved" "error in loading DLL" Tracey L Excel Discussion (Misc queries) 0 December 1st 08 12:57 PM
How do I move a document from "recent items" to "documents" John Gerke in Central Oregon New Users to Excel 1 March 2nd 08 08:31 AM
ExecuteExcel4Macro "SET.PRINT.AREA" Syntax marwan Excel Programming 2 March 19th 07 07:31 PM
Retrieving info from "child" to a "parent" document create button to unhide rows Excel Discussion (Misc queries) 0 January 21st 07 10:40 PM
Solution "Your changes could not be saved" "The document may be read-only or encrypted" [email protected] Excel Discussion (Misc queries) 0 August 7th 06 06:31 AM


All times are GMT +1. The time now is 07:46 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"