New
#1
need excel vba help wtith making pdf files
Hi, I would like to save my excel sheet as PDF + print that sheet on my local printer (so changing default printer to Adobe PDF printer will not work)
I searched help database and I found two commands that by my logics could work - PRINTOUT and EXPORTASFIXEDFORMAT.
Now for the first comand I wrote:
but I get the errorCode:Sub Macro1() Application.Activate = "Adobe_PDF_Converter" 'that's how my pdf printer is labeld ActiveSheet.PrintOut prewiew:=False, _ ActivePrinter:=Adobe_PDF_Converter, _ printofile:=True, _ PrToFileName:="C:\users\borut\desktop\primer.pdf" End Sub
runtime error '438':
object doesn't support this property or method
and for the second:
but I got the error:Code:Sub Macro2() ActiveDocument.ExportAsFixedFormat OutputFileName:= _ "C:\Users\borut\Desktop\test.pdf", ExportFormat:=xlTypePDF End Sub
runtime error '424':
object required