sendobject from mde

G

Guest

Hi all,
Is it possible to send reports via email from within an Access 97 mde file?
I have a procedure that opens outlook in case it isn't already open, then
uses the sendobject function to send a snapshot of a report. It works fine in
the mdb file, but I get an error from the mde saying the outputto function
isn't available. I'm assuming outputto and sendobject share an error number...
Any help would be appreciated.
Thanks in advance.
Dave
 
M

MA

Dave said:
Hi all,
Is it possible to send reports via email from within an Access 97 mde
file?
I have a procedure that opens outlook in case it isn't already open,
then uses the sendobject function to send a snapshot of a report. It
works fine in the mdb file, but I get an error from the mde saying
the outputto function isn't available. I'm assuming outputto and
sendobject share an error number... Any help would be appreciated.
Thanks in advance.
Dave

There is no problem to sendobject from mde.
Try to post the code

--
_ _
Ciao
MAssimiliano Amendola www.accessgroup.it
Cisa1 - I° Conferenza Italiana per Sviluppatori Access Arezzo 4+5
Giugno 2005 Sono aperte le iscrizioni Info: www.donkarl.com/it
 
G

Guest

here's the code in question. all variables have been properly defined.

Set db = CurrentDb()

'^^^Open Outlook
'Shell ("C:\Program Files\Microsoft Office2k\Office\outlook.exe")

'^^^Now create the email.^^^
DoCmd.SendObject acReport, "R_Audit", "SnapshotFormat(*.snp)",
strToList, strCcList, strBccList, "Audits - " & Date, Format(Date, "long
date") & ".", False, ""

db.Execute "UPDATE USysinfo SET USysinfo.LastAudit = Date()"

db.Close
 
R

Rick Brandt

Dave said:
here's the code in question. all variables have been properly defined.

Set db = CurrentDb()

'^^^Open Outlook
'Shell ("C:\Program Files\Microsoft
Office2k\Office\outlook.exe")

'^^^Now create the email.^^^
DoCmd.SendObject acReport, "R_Audit", "SnapshotFormat(*.snp)",
strToList, strCcList, strBccList, "Audits - " & Date, Format(Date,
"long date") & ".", False, ""

db.Execute "UPDATE USysinfo SET USysinfo.LastAudit = Date()"

db.Close

Try "Snapshot Format" instead of "SnapshotFormat(*.snp)".

That's what I've always used in A97. Otherwise try a different report in
another output fromat to isolate what the issue is.
 
G

Guest

Thanks Rick.
..xls files were sending fine prior to this addition. I changed to "Snapshot
Format" and all is well.

Cheers
Dave
 

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