PC Review


Reply
Thread Tools Rate Thread

I can't send an Access report via email using DoCmd.SendObject ac.

 
 
=?Utf-8?B?TWlrZSBTdG9ja3BvcnQgVUs=?=
Guest
Posts: n/a
 
      2nd Feb 2005
When I send a report via email using a command button the following code
runs. This code works on some XP machines and not others.

DoCmd.SendObject acReport, stDocName, "html"

When it doesn't work the error message is

"***** can't send this format in a mail message"

where ***** is the access program name.

Note if you take the "html" off and allow a prompt box to come up and then
select 'HTML' it works.
Also if you change it "html" to "rtf" it works.

Has anyone seen this before.
 
Reply With Quote
 
 
 
 
Dan Artuso
Guest
Posts: n/a
 
      2nd Feb 2005
Hi,
I'm not sure why it works at all because the format argument should be a constant.
Here's the snippet from Help:

outputformat One of the following intrinsic constants:
acFormatHTML
acFormatRTF
acFormatTXT
acFormatXLS
If you leave this argument blank, Microsoft Access prompts you for the output format.

Note that these equate to numbers, not strings.

--
HTH
Dan Artuso, Access MVP


"Mike Stockport UK" <Mike Stockport (E-Mail Removed)> wrote in message
news6998ED4-31E0-41BE-8613-(E-Mail Removed)...
> When I send a report via email using a command button the following code
> runs. This code works on some XP machines and not others.
>
> DoCmd.SendObject acReport, stDocName, "html"
>
> When it doesn't work the error message is
>
> "***** can't send this format in a mail message"
>
> where ***** is the access program name.
>
> Note if you take the "html" off and allow a prompt box to come up and then
> select 'HTML' it works.
> Also if you change it "html" to "rtf" it works.
>
> Has anyone seen this before.



 
Reply With Quote
 
=?Utf-8?B?TWlrZSBTdG9ja3BvcnQgVUs=?=
Guest
Posts: n/a
 
      2nd Feb 2005
Thanks for that, my mistake, works fine now

"Dan Artuso" wrote:

> Hi,
> I'm not sure why it works at all because the format argument should be a constant.
> Here's the snippet from Help:
>
> outputformat One of the following intrinsic constants:
> acFormatHTML
> acFormatRTF
> acFormatTXT
> acFormatXLS
> If you leave this argument blank, Microsoft Access prompts you for the output format.
>
> Note that these equate to numbers, not strings.
>
> --
> HTH
> Dan Artuso, Access MVP
>
>
> "Mike Stockport UK" <Mike Stockport (E-Mail Removed)> wrote in message
> news6998ED4-31E0-41BE-8613-(E-Mail Removed)...
> > When I send a report via email using a command button the following code
> > runs. This code works on some XP machines and not others.
> >
> > DoCmd.SendObject acReport, stDocName, "html"
> >
> > When it doesn't work the error message is
> >
> > "***** can't send this format in a mail message"
> >
> > where ***** is the access program name.
> >
> > Note if you take the "html" off and allow a prompt box to come up and then
> > select 'HTML' it works.
> > Also if you change it "html" to "rtf" it works.
> >
> > Has anyone seen this before.

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DoCmd.SendObject Report as Body of Email not attachment sayrevilleNJ Microsoft Access 0 5th Mar 2009 05:51 PM
Use DoCmd.SendObject to send Select Query GVR_Mike Microsoft Access Queries 0 8th Nov 2007 03:43 PM
DoCmd.SendObject to send form msmuzila@gmail.com Microsoft Access 0 5th May 2007 10:06 PM
Using the docmd.sendobject in a report =?Utf-8?B?QW5keW0=?= Microsoft Access Reports 1 24th Jan 2006 10:02 PM
DoCmd.SendObject - Send multiple objects =?Utf-8?B?Tm92aWNl?= Microsoft Access VBA Modules 1 20th Nov 2003 09:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:48 AM.