Creating a post-script file using Excel


Posted by J. Pean on November 07, 2000 7:42 AM

oes anyone know how get around the problem of creating an output file for the post-script
file that was created using Excel VBA code. There is no way to supply the file name in my
code because a prompt to supply a filename keeps popping up. I know the problem is fixed in
Excel 2000, but is there a solution for Excel 97 or is there a win32 API I can use.

Posted by Ivan Moala on November 08, 2000 2:46 AM


What is the VBA code that is causing you grief ?
Perhaps someone can help, if we saw the code ?


Ivan

Posted by J. Pean on November 08, 2000 6:29 AM

Here's the code... The sendkeys command is suppose to buffer the information until the "print to file" screen appears. Nothing happens.

Application.DisplayAlerts = False
Application.Goto Reference:="Print_Area"
Columns("A:A").Select
Range("A2").Activate
stmt = "c:\temp\AsapTest1.prn" & "{ENTER}"
SendKeys stmt, False
ActiveWindow.SelectedSheets.PrintOut ActivePrinter:= _
"\\RAMSWP02\WFC_7_7610 on Ne00:", PrintToFile:=True

JP


Posted by J. Pean on November 08, 2000 6:48 AM

Here's the code... The sendkeys command is suppose to buffer the information until the "print to file" screen appears. Nothing happens.

Application.DisplayAlerts = False
Application.Goto Reference:="Print_Area"
Columns("A:A").Select
Range("A2").Activate
stmt = "c:\temp\AsapTest1.prn" & "{ENTER}"
SendKeys stmt, False
ActiveWindow.SelectedSheets.PrintOut ActivePrinter:= _
"\\RAMSWP02\WFC_7_7610 on Ne00:", PrintToFile:=True

JP



Posted by J. Pean on November 08, 2000 7:56 AM

Ivan,

I take that back. The code does work. I was running it in debug mode so the buffer would release the command in debug mode not at the pop up window.
Would you know if there is a way to write to apple drivers in stead of the apple printer?

JP