I am trying to save a report as pdf and email it .
the code that I am using it is the following
[VBA]Private Sub Command4_Click()
'DoCmd.OpenReport "qryEncumberedProjectReport", acViewPreview
'DoCmd.OutputTo acOutputReport, "Test", acFormatPDF, "C:\Documents and 'Settings\vvishwanatha\My Documents\CMS\" & "test" & ".pdf"

DoCmd.SendObject acSendReport, "qryEncumberedProjectReport", acFormatPDF
End Sub
[/VBA]
it gives me a error 2282, saying that the format in which you are attempting to output the current object is not available.
I then downloaded the pdf extension but still find the same error.

I am using access 2007
I have done some search online and read at one place saying that this cannot be done in 2007, as this is bug.

any one can help me to work this

Thank you