J
joeeng
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
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