Excel Printing

F

ffyring

Hi, I have written a small VBA macro in excel (2002) which print outs a
excel sheet as a pdf file.
It used to work well until an update of acrobat was installed.

Now it stops when I try to print out the ps file with the error
"go to printer properties ... turn OFF the option Do not send fonts to
distiller".
--------------------------------
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True,
PrintToFile:=True, PrToFileName:=ps_filename ''<<<----- This line gives
the error
--------------------------------


Well, I go to the printer settings for the PDF writer, and the checkbox
there is named
"Do not send fonts to Adobe PDF". Similar but not the same.
This is already unchecked, but the macro still doesn't work.

I can print another excelsheet with a nearly identical macro, and that
works fine. I guess
the problem is that the non working macro tries to print out a page
with other fonts or something.

Any idea of how I can get this to work? Is there any easier way to
print a pdf (via vba, and where I
can specify a filename)?

I have acrobat distiller 7.0, and acrobat 7.0 standard.

----------------------------------------------------------------------------------
Application.ActivePrinter = "Adobe PDF on Ne01:"
pdf_filename = "my_pdf_filename.pdf"
ps_filename = "my_ps_filename.pdf"

ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True,
PrintToFile:=True, PrToFileName:=ps_filename ''<<<----- This line gives
the error

Dim myPDF As PdfDistiller6
Set myPDF = New PdfDistiller6
myPDF.FileToPDF ps_filename, pdf_filename, ""
 
G

Guest

My "Sledge-hammer" approach would be to go back to your previous version of
Acrobat, unless that 7.0 really does something special that you need
elsewhere. I use 5.0 myself because I ran into a similar problem one time.

hth
Vaya con Dios,
Chuck, CABGx3
 
L

lithium

Hi,

Did you manage to figure out the problem? I have acrobat writer
standard 6.0 and when I try and run the code :

Application.ActivePrinter = "Adobe PDF on Ne00:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True, _
PrintToFile:=True, PrToFileName:="test.pdf"

It creates a test.pdf document which is empty and adobe can't even open
it.

Thank you!
Regards,
 
C

ch

Did you manage to figure out the problem? I have acrobat writer
standard 6.0 and when I try and run the code :


One of the acrobat 7.0x updates fixed this at work. We had everyone
upgrade to 7.02 even though v5 was working well as the new machines had
it installed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top