Thank you - it finaly solved the problem. What I didnot know was hat I have to download an add-in before it worked
Main Topics
Browse All TopicsWhen I print to PDF by hand it works fine, but when I print from a macro the size becomes 10 times bigger, and is not recognized as a pdf file.
I have deactivated rely on system fonts.. in the ADOBE pdf-printer
The code I use is:
PrintFileName = "xxx2.pdf"
hj = ActiveSheet.PrintOut(1, 1, 1, False, "Adobe PDF på Ne04:", True, False, PrintFileName)
If I try opening the file in Adobe Illustrator I get the message:
Font not found on the system. Missing font has been substituted
Then the file is opened, but the text is nonsense
I attach the file if it is of any help. Test3 is the file written 'by hand', xxx2 is the file written by the macro
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: exciter_grPosted on 2008-02-01 at 01:55:58ID: 20795356
I am not an expert on pdf creation, but i think that you should not set your printer to print to a file. When you do, even if you give a known extension like pdf, or doc, the file that is created is not in that format. It is written in printer 'language' and even so it does have the correct extension, it can not be opened in applications like acrobat or word.
ormat Type:=xlTypePDF, Filename:= _ f", Quality:=xlQualityStandard , _ , IgnorePrintAreas:=False, OpenAfterPublish:= True
When you do the procedure 'by hand' do you click on the 'print-to-file' option in the printing dialog box, or you just select the Adobe pdf-printer? Try checking this option when you printing by hand i think you will get the same results as the macro output.
If you use excel 2007 version, it has an built-in tool to create pdfs through macros with a code like the following:
ActiveSheet.ExportAsFixedF
"C:\MyWorks\ee_sample97.pd
IncludeDocProperties:=True
Hope this helps
Best
exciter