SendObject Method VBA

G

Guest

I use the SendObject method to send a table in text format to a user. My
question, is there any way I can eliminate the table formatting [like you can
when you use the Export feature from the File menu] via code? I am using
Access2000.

Thanks
 
G

Guest

Thanks but I want to send it as an attachment without the table formatting.
The user wants to load the data to a file in a SQL database.

Alex Dybenko said:
Hi,
you can probably try something like this:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=71

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Nancy said:
I use the SendObject method to send a table in text format to a user. My
question, is there any way I can eliminate the table formatting [like you
can
when you use the Export feature from the File menu] via code? I am using
Access2000.

Thanks
 
A

Alex Dybenko

Then you can use outlook object model to send such kind of message
there are several articles with sample code in KB, for example this one:
http://support.microsoft.com/default.aspx?scid=kb;en-us;318881

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Nancy said:
Thanks but I want to send it as an attachment without the table
formatting.
The user wants to load the data to a file in a SQL database.

Alex Dybenko said:
Hi,
you can probably try something like this:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=71

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Nancy said:
I use the SendObject method to send a table in text format to a user.
My
question, is there any way I can eliminate the table formatting [like
you
can
when you use the Export feature from the File menu] via code? I am
using
Access2000.

Thanks
 
G

Guest

The code is working correctly to send the table in text format to an email
address. What I want to do is remove the formating from the table.txt file
before sending it so that the data is in tab deliminted without the ---- and
||| that access puts into the table in text format. The same process that
you can do by going to File>Export>Save as file type select TEXT File then a
menu appears asking you how you want to save this information ... This is
what I want to do in Access VBA using the SendObject Method.

I can format the table file correctly if using the TransferFile Method but
then need to be able to email the resulting .TXT file to a user via Access
VBA ..

Can this be done and if so how do I go about doing it? I have checked with
other Access developers in my group and we are all at a loss.

Alex Dybenko said:
Then you can use outlook object model to send such kind of message
there are several articles with sample code in KB, for example this one:
http://support.microsoft.com/default.aspx?scid=kb;en-us;318881

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Nancy said:
Thanks but I want to send it as an attachment without the table
formatting.
The user wants to load the data to a file in a SQL database.

Alex Dybenko said:
Hi,
you can probably try something like this:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=71

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


I use the SendObject method to send a table in text format to a user.
My
question, is there any way I can eliminate the table formatting [like
you
can
when you use the Export feature from the File menu] via code? I am
using
Access2000.

Thanks
 
A

Alex Dybenko

Hi Nancy,
yes, this can be done:
1. save report to text file using code from:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=71
2. send email with attached text file using technique like here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;161088

just comebine to procedures, instead of using sendobject use SendMessage
(modified)

HTH
--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Nancy said:
The code is working correctly to send the table in text format to an email
address. What I want to do is remove the formating from the table.txt
file
before sending it so that the data is in tab deliminted without the ----
and
||| that access puts into the table in text format. The same process that
you can do by going to File>Export>Save as file type select TEXT File then
a
menu appears asking you how you want to save this information ... This is
what I want to do in Access VBA using the SendObject Method.

I can format the table file correctly if using the TransferFile Method but
then need to be able to email the resulting .TXT file to a user via Access
VBA ..

Can this be done and if so how do I go about doing it? I have checked
with
other Access developers in my group and we are all at a loss.

Alex Dybenko said:
Then you can use outlook object model to send such kind of message
there are several articles with sample code in KB, for example this one:
http://support.microsoft.com/default.aspx?scid=kb;en-us;318881

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Nancy said:
Thanks but I want to send it as an attachment without the table
formatting.
The user wants to load the data to a file in a SQL database.

:

Hi,
you can probably try something like this:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=71

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


I use the SendObject method to send a table in text format to a user.
My
question, is there any way I can eliminate the table formatting
[like
you
can
when you use the Export feature from the File menu] via code? I am
using
Access2000.

Thanks
 
G

Guest

Thanks Alex ...

Now one more question - I have the extract working using TransferText
because I can stipulate the export format. Now when I email using MS Outlook
via VBA code, I get these boxes that I know are security based that keep
telling me that a program is trying to acces email addresses I have stored
..... Do I want to allow this? Now it asks this twice and twice the customer
is going to have to reply Yes in order for the file to get sent. Is there
any way to turn this off?

Thanks again for your help ...

Alex Dybenko said:
Hi Nancy,
yes, this can be done:
1. save report to text file using code from:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=71
2. send email with attached text file using technique like here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;161088

just comebine to procedures, instead of using sendobject use SendMessage
(modified)

HTH
--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Nancy said:
The code is working correctly to send the table in text format to an email
address. What I want to do is remove the formating from the table.txt
file
before sending it so that the data is in tab deliminted without the ----
and
||| that access puts into the table in text format. The same process that
you can do by going to File>Export>Save as file type select TEXT File then
a
menu appears asking you how you want to save this information ... This is
what I want to do in Access VBA using the SendObject Method.

I can format the table file correctly if using the TransferFile Method but
then need to be able to email the resulting .TXT file to a user via Access
VBA ..

Can this be done and if so how do I go about doing it? I have checked
with
other Access developers in my group and we are all at a loss.

Alex Dybenko said:
Then you can use outlook object model to send such kind of message
there are several articles with sample code in KB, for example this one:
http://support.microsoft.com/default.aspx?scid=kb;en-us;318881

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Thanks but I want to send it as an attachment without the table
formatting.
The user wants to load the data to a file in a SQL database.

:

Hi,
you can probably try something like this:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=71

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


I use the SendObject method to send a table in text format to a user.
My
question, is there any way I can eliminate the table formatting
[like
you
can
when you use the Export feature from the File menu] via code? I am
using
Access2000.

Thanks
 
A

Alex Dybenko

Hi Nancy,
to solve this issue i would suggest to look at:
http://www.dimastr.com/redemption/

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Nancy said:
Thanks Alex ...

Now one more question - I have the extract working using TransferText
because I can stipulate the export format. Now when I email using MS
Outlook
via VBA code, I get these boxes that I know are security based that keep
telling me that a program is trying to acces email addresses I have stored
.... Do I want to allow this? Now it asks this twice and twice the
customer
is going to have to reply Yes in order for the file to get sent. Is there
any way to turn this off?

Thanks again for your help ...

Alex Dybenko said:
Hi Nancy,
yes, this can be done:
1. save report to text file using code from:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=71
2. send email with attached text file using technique like here:
http://support.microsoft.com/default.aspx?scid=kb;en-us;161088

just comebine to procedures, instead of using sendobject use SendMessage
(modified)

HTH
--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Nancy said:
The code is working correctly to send the table in text format to an
email
address. What I want to do is remove the formating from the table.txt
file
before sending it so that the data is in tab deliminted without
the ----
and
||| that access puts into the table in text format. The same process
that
you can do by going to File>Export>Save as file type select TEXT File
then
a
menu appears asking you how you want to save this information ... This
is
what I want to do in Access VBA using the SendObject Method.

I can format the table file correctly if using the TransferFile Method
but
then need to be able to email the resulting .TXT file to a user via
Access
VBA ..

Can this be done and if so how do I go about doing it? I have checked
with
other Access developers in my group and we are all at a loss.

:

Then you can use outlook object model to send such kind of message
there are several articles with sample code in KB, for example this
one:
http://support.microsoft.com/default.aspx?scid=kb;en-us;318881

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


Thanks but I want to send it as an attachment without the table
formatting.
The user wants to load the data to a file in a SQL database.

:

Hi,
you can probably try something like this:
http://maug.pointltd.com/access/Queries/TipDetail.asp?TipID=71

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com


I use the SendObject method to send a table in text format to a
user.
My
question, is there any way I can eliminate the table formatting
[like
you
can
when you use the Export feature from the File menu] via code? I
am
using
Access2000.

Thanks
 

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