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: 54
Default Addobe PDF printer


I am executing the following prrocedure which is located in a standard module
to get Adobe PDF to generate a postscript file. When I call this procedure
from a worksheet module it executes perfectly. When I call it from a
userform module, it crashes with the error "When you create a postscript
file, you must rely on System fonts and use document fonts" and creates an
empty postscript file. It should be calling the same print driver in both
cases, but apparently is not. Does anyone know how to correct this? Am I
missing a qualifier?

Sub Printworkbookpdf()

Dim myprinter As String

myprinter=Application.ActivePrinter
Worksheets("Cover").Select
ActiveSheet.PrintOut Preview:=False, ActivePrinter:="Adobe PDF",
PrintToFile:=True, PrToFileName:=psFileName
Application.ActivePrinter=myprinter

End Sub
 
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
Available Printer names to be placed in a range on a sheet and Force selection based on part of Printer name Corey Excel Programming 0 October 3rd 08 01:27 AM
store default printer, change printer and then restore default printer? Dennis Pedersen Excel Programming 0 November 14th 07 09:18 PM
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
Printer Multiple Worksheets with a particular Printer Setting PP[_2_] Excel Worksheet Functions 0 March 14th 07 02:02 PM
Send printer escape commands to a printer using VBA mikeburg[_41_] Excel Programming 3 October 6th 05 07:36 PM


All times are GMT +1. The time now is 02:44 AM.

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"