Sendobject

  • Thread starter Jean-Paul De Winter
  • Start date
J

Jean-Paul De Winter

Hi,

Following line returns an errormessage



DoCmd.SendObject acSendReport, stdocname, acFormatSNP, tb4!E_mail, , ,
[SUBJECTBOX], [MESSAGEBOX], 0



Saying (now I have to translate. probably not very correct)



The. in which you try to execute the current object isn't available



I think it all has to do with the "acFormatSNP"



The report I try to send has 2 jpg object (firm-logo) so, when I send the
report as a TXT both jpg objects aren't included.

What to do to be able to send the report together with the jpg files.



Thanks
 
D

Dirk Goldgar

Jean-Paul De Winter said:
Hi,

Following line returns an errormessage

DoCmd.SendObject acSendReport, stdocname, acFormatSNP, tb4!E_mail, , ,
[SUBJECTBOX], [MESSAGEBOX], 0

Saying (now I have to translate. probably not very correct)

The. in which you try to execute the current object isn't available

I think it all has to do with the "acFormatSNP"

The report I try to send has 2 jpg object (firm-logo) so, when I
send the report as a TXT both jpg objects aren't included.

What to do to be able to send the report together with the jpg files.

Thanks

In some versions of Access, the acFormatSNP constant wasn't defined.
Try specifying ""Snapshot Format (*.snp)" -- quotes and all -- in place
of acFormatSNP.
 
J

Jean-Paul De Winter

problem still not solved...
Any other suggestion?
Thanks
Dirk Goldgar said:
Jean-Paul De Winter said:
Hi,

Following line returns an errormessage

DoCmd.SendObject acSendReport, stdocname, acFormatSNP, tb4!E_mail, , ,
[SUBJECTBOX], [MESSAGEBOX], 0

Saying (now I have to translate. probably not very correct)

The. in which you try to execute the current object isn't available

I think it all has to do with the "acFormatSNP"

The report I try to send has 2 jpg object (firm-logo) so, when I
send the report as a TXT both jpg objects aren't included.

What to do to be able to send the report together with the jpg files.

Thanks

In some versions of Access, the acFormatSNP constant wasn't defined.
Try specifying ""Snapshot Format (*.snp)" -- quotes and all -- in place
of acFormatSNP.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
D

Dirk Goldgar

Jean-Paul De Winter said:
problem still not solved...
Any other suggestion?
Thanks


It's hard to say without seeing the rest of the code. If the exact same
code works when you use acFormatTXT, then I can only wonder what version
of Access you are using, and whether the snapshot format is not
installed.

On the other hand, if it fails even with acFormatTXT, then I would ask
what tb4!Email, [SUBJECTBOX], and [MESSAGEBOX] are. I've been assuming
that tb4 is a recordset you've opened, Email is a field in that
recordset, and [SUBJECTBOX] and [MESSAGEBOX] are text boxes on the form
behind which this code is running. If those assumptions are false, that
could be the source of your problem.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)



Dirk Goldgar said:
Jean-Paul De Winter said:
Hi,

Following line returns an errormessage

DoCmd.SendObject acSendReport, stdocname, acFormatSNP, tb4!E_mail,
, , [SUBJECTBOX], [MESSAGEBOX], 0

Saying (now I have to translate. probably not very correct)

The. in which you try to execute the current object isn't available

I think it all has to do with the "acFormatSNP"

The report I try to send has 2 jpg object (firm-logo) so, when I
send the report as a TXT both jpg objects aren't included.

What to do to be able to send the report together with the jpg
files.

Thanks

In some versions of Access, the acFormatSNP constant wasn't defined.
Try specifying ""Snapshot Format (*.snp)" -- quotes and all -- in
place of acFormatSNP.
 
J

Jean-Paul De Winter

it works with csFormatTXT but the I loose the logo...
I installed the "snapshot viewer" without any result
JP
Dirk Goldgar said:
Jean-Paul De Winter said:
problem still not solved...
Any other suggestion?
Thanks


It's hard to say without seeing the rest of the code. If the exact same
code works when you use acFormatTXT, then I can only wonder what version
of Access you are using, and whether the snapshot format is not
installed.

On the other hand, if it fails even with acFormatTXT, then I would ask
what tb4!Email, [SUBJECTBOX], and [MESSAGEBOX] are. I've been assuming
that tb4 is a recordset you've opened, Email is a field in that
recordset, and [SUBJECTBOX] and [MESSAGEBOX] are text boxes on the form
behind which this code is running. If those assumptions are false, that
could be the source of your problem.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)



Dirk Goldgar said:
Hi,

Following line returns an errormessage

DoCmd.SendObject acSendReport, stdocname, acFormatSNP, tb4!E_mail,
, , [SUBJECTBOX], [MESSAGEBOX], 0

Saying (now I have to translate. probably not very correct)

The. in which you try to execute the current object isn't available

I think it all has to do with the "acFormatSNP"

The report I try to send has 2 jpg object (firm-logo) so, when I
send the report as a TXT both jpg objects aren't included.

What to do to be able to send the report together with the jpg
files.

Thanks

In some versions of Access, the acFormatSNP constant wasn't defined.
Try specifying ""Snapshot Format (*.snp)" -- quotes and all -- in
place of acFormatSNP.
 
J

Jean-Paul De Winter

I use office 2003

Dirk Goldgar said:
Jean-Paul De Winter said:
problem still not solved...
Any other suggestion?
Thanks


It's hard to say without seeing the rest of the code. If the exact same
code works when you use acFormatTXT, then I can only wonder what version
of Access you are using, and whether the snapshot format is not
installed.

On the other hand, if it fails even with acFormatTXT, then I would ask
what tb4!Email, [SUBJECTBOX], and [MESSAGEBOX] are. I've been assuming
that tb4 is a recordset you've opened, Email is a field in that
recordset, and [SUBJECTBOX] and [MESSAGEBOX] are text boxes on the form
behind which this code is running. If those assumptions are false, that
could be the source of your problem.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)



Dirk Goldgar said:
Hi,

Following line returns an errormessage

DoCmd.SendObject acSendReport, stdocname, acFormatSNP, tb4!E_mail,
, , [SUBJECTBOX], [MESSAGEBOX], 0

Saying (now I have to translate. probably not very correct)

The. in which you try to execute the current object isn't available

I think it all has to do with the "acFormatSNP"

The report I try to send has 2 jpg object (firm-logo) so, when I
send the report as a TXT both jpg objects aren't included.

What to do to be able to send the report together with the jpg
files.

Thanks

In some versions of Access, the acFormatSNP constant wasn't defined.
Try specifying ""Snapshot Format (*.snp)" -- quotes and all -- in
place of acFormatSNP.
 
D

Dirk Goldgar

Jean-Paul De Winter said:
it works with csFormatTXT but the I loose the logo...

Assuming you meant acFormatTXT, that result suggests that the SendObject
syntax is correct but there's something wrong with the snapshot format.
You tried

DoCmd.SendObject _
acSendReport, _
stdocname,
"Snapshot Format (*.snp)", _
tb4!E_mail, , , _
[SUBJECTBOX], _
[MESSAGEBOX], _
0

as I instructed? Looking back, I see that in the message where I
suggested this, I had an extra quote on the front of "Snapshot Format
(*.snp)", so if you copied that exactly it could have been the cause of
it not working.

Incidentally, you didn't tell me exactly in what way that attempt
failed. Was it the same error message as you had the first time?
Please tell me the exact error number you're getting, and the original,
untranslated text of the message, and your translation of it. The
translation you originally posted doesn't make sense to me, and I think
you left something out.
I installed the "snapshot viewer" without any result

Installing the viewer might not make any difference, but it seems to me
that you may have to specifically install support for the snapshot
format. I have a vague memory that it isn't installed by default.
 
J

Jean-Paul De Winter

I did what you suggested and got errormessage 2282
I think the best translation would be:

"The format in which you are attempting to output the current object is
not available."

maybe indeed it has to do with the installation of the snapshot.
In a former version of Access the code worked just fine, but recently I did
a format c: and an installation of windows XP and office 2003.

Thanks you so much for your kind help
JP


Dirk Goldgar said:
Jean-Paul De Winter said:
it works with csFormatTXT but the I loose the logo...

Assuming you meant acFormatTXT, that result suggests that the SendObject
syntax is correct but there's something wrong with the snapshot format.
You tried

DoCmd.SendObject _
acSendReport, _
stdocname,
"Snapshot Format (*.snp)", _
tb4!E_mail, , , _
[SUBJECTBOX], _
[MESSAGEBOX], _
0

as I instructed? Looking back, I see that in the message where I
suggested this, I had an extra quote on the front of "Snapshot Format
(*.snp)", so if you copied that exactly it could have been the cause of
it not working.

Incidentally, you didn't tell me exactly in what way that attempt
failed. Was it the same error message as you had the first time?
Please tell me the exact error number you're getting, and the original,
untranslated text of the message, and your translation of it. The
translation you originally posted doesn't make sense to me, and I think
you left something out.
I installed the "snapshot viewer" without any result

Installing the viewer might not make any difference, but it seems to me
that you may have to specifically install support for the snapshot
format. I have a vague memory that it isn't installed by default.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
D

Dirk Goldgar

Jean-Paul De Winter said:
I did what you suggested and got errormessage 2282
I think the best translation would be:

"The format in which you are attempting to output the current object
is not available."

maybe indeed it has to do with the installation of the snapshot.
In a former version of Access the code worked just fine, but recently
I did a format c: and an installation of windows XP and office 2003.

I would try reinstalling "to add additional features", or whatever they
call this particular type of installation. Check through all the
options and make sure you add all the import/export formats.
Thanks you so much for your kind help

You're welcome, though I don't seem to have been much help yet.
 

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

Similar Threads


Top