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 error
runtime error '438':
object doesn't support this property or method
and for the second:
but I got the error:
runtime error '424':
object required
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:
Code:
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
but I get the error
runtime error '438':
object doesn't support this property or method
and for the second:
Code:
Sub Macro2()
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
"C:\Users\borut\Desktop\test.pdf", ExportFormat:=xlTypePDF
End Sub
but I got the error:
runtime error '424':
object required
My Computer
- OS
- win 7 x64
- CPU
- e6550
- Motherboard
- intel
- Graphics Card(s)
- gf8600gt
