Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for your help.
I wrote a macro see below. The problem is it only prints in black and white and I need color. Any ideas !!! Sub Brian() ' ' PrintPDF2 Macro ' Macro recorded 12/16/2003 by bjstruch ' Dim PSFileName As String Dim PDFFileName As String Dim DistillerCall As String Dim ReturnValue As Variant 'Local folder to hold PSFileName and PDFFileName PSFileName = "C:\temp\Brian.PS" PDFFileName = "C:\temp\Brian.PDF" 'If exist then delete If Dir(PSFileName) < "" Then Kill (PSFileName) If Dir(PDFFileName) < "" Then Kill (PDFFileName) SendKeys PSFileName & "{ENTER}", False 'This is where you set the active area Application.Goto Reference:="TBLBDGR" ActiveSheet.PageSetup.PrintArea = "$M$75:$S$131" ActiveSheet.PrintOut , printtofile:=True 'Add " " to file names [Chr(34) = "] PSFileName = Chr(34) & PSFileName & Chr(34) PDFFileName = Chr(34) & PDFFileName & Chr(34) 'Call .exe to writ PS file to PDF format DistillerCall = "C:\Program Files\Adobe\Acrobat 5.0\Distillr\Acrodist.exe" & _ " /n /q /c" & PDFFileName & " " & PSFileName '" /n /q /o" 'If the application doesn't open correctly let us know about it ReturnValue = Shell(DistillerCall, vbNormalFocus) If ReturnValue = 0 Then MsgBox "Creation of" & PDFFileName & "failed." ' End Sub --- Message posted from http://www.ExcelForum.com/ |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
passing variables from an excel macro to a powerpoint macro | Excel Programming |