docmd.sendobject

L

Luciano

Hello,
After dowloading the Add-in 'Save as PDF and XPS', I wrote in a module the
vba-code (Access 2007-VBA) in order to use my default mail-program to mail a
report (rapportBevestiging) in PDF to an email-adress(txtemail).
'DoCmd.SendObject acSendReport, rapportBevestiging, acFormatPDF, txtemail, ,
, strSubject, strMessage'
It happens to work correctly, but when I run my application on another
computer, it doesn't work. Can anyone help me?
Luciano
 
A

Allen Browne

There's no guarantee SendObject will work. User may not have a
MAPI-compliant email client, or there may be a problem with the way it it
installed, or there could be an issue with permissions/security policies.

Or perhaps the other use has an older version of Access, that doesn't
support the new add-in. If so, you might need to code 2 approaches for the 2
versions. This kind of thing:

If Val(SysCmd(acSysCmdAccessVer)) >= 12# Then
'do the Access 2007 thing
Else
'do something that works in older versions.
End If
 
L

Luciano

Hello Ellen,
This had nothing to do with Microsoft, but I decovered a fault in my code:
the name 'rapportbevestiging' was the wrong variable: Stupid me. Thanks
anyway.
Luciano
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top