Question Sending report as pdf email to Novell Groupwise

miacino

Registered User.
Local time
Today, 08:36
Joined
Jun 5, 2007
Messages
106
I'm working with Access 2003 with very little coding background/experience!

I've created a command button to email a report (as a pdf) to an email in Novell Groupwise.

The code I used is:

DoCmd.SendObject acsSendReport, "Activity_KR", "PDF", "name@company.org", , , "KR time off", ,

With report name = "activity_KR", and email subject line as "KR time off"

I am getting an error message:
Compile error: Syntax error

Any suggestions/help much appreciated!!
Michele
 
I think the format is acFormatPDF, which is a constant.. not "PDF"
 
Thanks!... I went ahead and tried that:

Private Sub Command32_Click()
DoCmd.SendObject acsSendReport, "Activity_KR", "acFormatPDF", "name@company.org", , , "KR time off/change submission", ,
End Sub

Still getting a syntax error :confused:
 
As I mentioned it is a constant.. you do not need to wrap them in "" just..
Code:
DoCmd.SendObject acsSendReport, "Activity_KR", [B]acFormatPDF,[/B] "[EMAIL="name@company.org"]name@company.org[/EMAIL]", , , "KR time off/change submission"
 
I see. Still learning this complex world of coding. Thanks for your help.

DoCmd.SendObject acsSendReport, "Activity_KR", acFormatPDF, "name@company.org", , , "KR time off/change submission"

No longer getting syntax error! However, am getting message:
The command or action 'SendOject' isn't available now.

Could this be related to 2003 or possible issues with Novell?
 
Just to confirm, is "acsSendReport" a typo you made on this thread, or are you using it in your VBA as well? It should be "acSendReport" (without quotes).

But more importantly, you're using Access 2003. I may be mistaken, but I don't think acFormatPDF is available on 2003. It's available on 2007 after installing an add-in from Microsoft. To automate sending a PDF using Access 2003, you're probably going to have to use a PDF converter. You should be able to find some threads if you google around, such as
http://www.access-programmers.co.uk/forums/showthread.php?t=173206
 
Thank you... yes, that was a thread typo.

I changed output format from pdf to snapshot:

DoCmd.SendObject acSendReport, "Activity_KR", "SnapshotFormat(*.snp)", "name@company.org", "name@company.org", , "KR time off/change submission"

Still getting the same error message.

Could it be that we are on a network?
 
Being on a network wouldn't affect SendObject. Do you have Microsoft Outlook setup and running on your computers? SendObject uses mail applications that use MAPI such as Microsoft Outlook or Windows Mail.
 

Users who are viewing this thread

Back
Top Bottom