Hi,
I'm having trouble with a specific e-mail text format attachment ...
The requirement is for the attachment to be .txt type and in this
format:
Label=FieldValue
Label=FieldValue
Label=FieldValue
Label=FieldValue
Label=FieldValue
etc., etc.,
The only way I could figure to accomplish this was to 1st do a report
in this format, but the problem I'm having is that as soon as I put the
controls too close together, the spacing between each row is not the
same - I need the each row to be directly under the other, with no line
spacing unless a space has been left on the report. The line-spacing
when viewing the report is fine, but as soon as it is e-mailed as an
attachment, the .txt attachment's line spacing is irregular - I would
really appreciate a solution to this problem. Many thanks 7 1645
How are you emailing this? Are you using SendObject? If so, as you've seen,
the formatting of SendObject leaves a lot to be desired. You can try the
other format types (html, rtf), but you'll likely find that they don't
render well either.
One option is to forego the attachment and include your info in the Body of
the email. You can build it like this;
Dim rst As DAO.REcordset
Dim strBody As STring
Set rst = CurrentDB.OpenRecordset("SQL statement to open the correct
record")
If Not (rst.EOF and rst.BOF) Then
strBody = "Name: : " & rst("NameField") & vbCrLf & "Address: " &
rst("AddressField") & vbcrlf & "City/State/Zip:" & rst("City") & " " &
rst("State") & ", " & rst("Zip")
End IF
DoCmd.SendObject , , , "us**@user.com", , , "Subject Here", strBody, True
set rst = Nothing
Or you can build a plaintext file and use other methods to attach it ... or
print your report to PDF and send that (can't do it with SendObject, but
there are other methods available).
<br******@dreamafrica.co.za> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com... Hi,
I'm having trouble with a specific e-mail text format attachment ...
The requirement is for the attachment to be .txt type and in this format: Label=FieldValue Label=FieldValue Label=FieldValue
Label=FieldValue Label=FieldValue
etc., etc.,
The only way I could figure to accomplish this was to 1st do a report in this format, but the problem I'm having is that as soon as I put the controls too close together, the spacing between each row is not the same - I need the each row to be directly under the other, with no line spacing unless a space has been left on the report. The line-spacing when viewing the report is fine, but as soon as it is e-mailed as an attachment, the .txt attachment's line spacing is irregular - I would really appreciate a solution to this problem. Many thanks
Brigitte,
I'd probably code this using VBA's built in string manipulation and file
capabilities. Something like:
Public Function GenEMail() As Long
'Dimension variables.
'Pull list of records to be output from database
'If there are records to be output, for each record
'Label = SomeString
'FieldValue = SomeValue
'File Row (X) = Label & "=" & FieldValue
'Close & save changes to file
'DoCmd.SendObject MyFile
End Function
The exact syntax & wording of the function will be different. But the idea
is there.
<br******@dreamafrica.co.za> wrote in message
news:11**********************@l41g2000cwc.googlegr oups.com... Hi,
I'm having trouble with a specific e-mail text format attachment ...
The requirement is for the attachment to be .txt type and in this format: Label=FieldValue br******@dreamafrica.co.za wrote: I'm having trouble with a specific e-mail text format attachment ...
The requirement is for the attachment to be .txt type and in this format: Label=FieldValue Label=FieldValue Label=FieldValue
Label=FieldValue Label=FieldValue
etc., etc.,
The only way I could figure to accomplish this was to 1st do a report in this format, but the problem I'm having is that as soon as I put the controls too close together, the spacing between each row is not the same - I need the each row to be directly under the other, with no line spacing unless a space has been left on the report. The line-spacing when viewing the report is fine, but as soon as it is e-mailed as an attachment, the .txt attachment's line spacing is irregular - I would really appreciate a solution to this problem. Many thanks
What method are you using to send the email? Outlook? As others have indicated
SendObject doesn't work.
It may not be possible to format the emails as you desire. The displaying of
attachments is likely entirely at the mercy of the email client software.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at http://www.granite.ab.ca/accsmstr.htm
On Fri, 25 Mar 2005 22:20:15 GMT, Tony Toews <tt****@telusplanet.net>
wrote: br******@dreamafrica.co.za wrote:
I'm having trouble with a specific e-mail text format attachment ...
The requirement is for the attachment to be .txt type and in this format: Label=FieldValue Label=FieldValue Label=FieldValue
Label=FieldValue Label=FieldValue
etc., etc.,
The only way I could figure to accomplish this was to 1st do a report in this format, but the problem I'm having is that as soon as I put the controls too close together, the spacing between each row is not the same - I need the each row to be directly under the other, with no line spacing unless a space has been left on the report. The line-spacing when viewing the report is fine, but as soon as it is e-mailed as an attachment, the .txt attachment's line spacing is irregular - I would really appreciate a solution to this problem. Many thanks
What method are you using to send the email? Outlook? As others have indicated SendObject doesn't work.
It may not be possible to format the emails as you desire. The displaying of attachments is likely entirely at the mercy of the email client software.
I put the info into a report and that e-mailed as an attachment
with SendObject.
Scott McDaniel wrote: How are you emailing this? Are you using SendObject? If so, as you've
seen, the formatting of SendObject leaves a lot to be desired. You can try
the other format types (html, rtf), but you'll likely find that they
don't render well either.
One option is to forego the attachment and include your info in the
Body of the email. You can build it like this;
Dim rst As DAO.REcordset Dim strBody As STring
Set rst = CurrentDB.OpenRecordset("SQL statement to open the correct record")
If Not (rst.EOF and rst.BOF) Then strBody = "Name: : " & rst("NameField") & vbCrLf & "Address: " & rst("AddressField") & vbcrlf & "City/State/Zip:" & rst("City") & " "
& rst("State") & ", " & rst("Zip") End IF
DoCmd.SendObject , , , "us**@user.com", , , "Subject Here", strBody,
True set rst = Nothing
Or you can build a plaintext file and use other methods to attach it
.... or print your report to PDF and send that (can't do it with SendObject,
but there are other methods available).
<br******@dreamafrica.co.za> wrote in message news:11**********************@l41g2000cwc.googlegr oups.com... Hi,
I'm having trouble with a specific e-mail text format attachment
.... The requirement is for the attachment to be .txt type and in this format: Label=FieldValue Label=FieldValue Label=FieldValue
Label=FieldValue Label=FieldValue
etc., etc.,
The only way I could figure to accomplish this was to 1st do a
report in this format, but the problem I'm having is that as soon as I put
the controls too close together, the spacing between each row is not
the same - I need the each row to be directly under the other, with no
line spacing unless a space has been left on the report. The
line-spacing when viewing the report is fine, but as soon as it is e-mailed as
an attachment, the .txt attachment's line spacing is irregular - I
would really appreciate a solution to this problem. Many thanks
Hi Scott,
Many thanks for your response ...
I am using SendObject to generate e-mail.
With reference to your last paragraph - "build a plaintext file" how do
you mean exactly & "use other methods to attach it" what would these
be?
Thank you
Scott McDaniel wrote: How are you emailing this? Are you using SendObject? If so, as you've
seen, the formatting of SendObject leaves a lot to be desired. You can try
the other format types (html, rtf), but you'll likely find that they
don't render well either.
One option is to forego the attachment and include your info in the
Body of the email. You can build it like this;
Dim rst As DAO.REcordset Dim strBody As STring
Set rst = CurrentDB.OpenRecordset("SQL statement to open the correct record")
If Not (rst.EOF and rst.BOF) Then strBody = "Name: : " & rst("NameField") & vbCrLf & "Address: " & rst("AddressField") & vbcrlf & "City/State/Zip:" & rst("City") & " "
& rst("State") & ", " & rst("Zip") End IF
DoCmd.SendObject , , , "us**@user.com", , , "Subject Here", strBody,
True set rst = Nothing
Or you can build a plaintext file and use other methods to attach it
.... or print your report to PDF and send that (can't do it with SendObject,
but there are other methods available).
<br******@dreamafrica.co.za> wrote in message news:11**********************@l41g2000cwc.googlegr oups.com... Hi,
I'm having trouble with a specific e-mail text format attachment
.... The requirement is for the attachment to be .txt type and in this format: Label=FieldValue Label=FieldValue Label=FieldValue
Label=FieldValue Label=FieldValue
etc., etc.,
The only way I could figure to accomplish this was to 1st do a
report in this format, but the problem I'm having is that as soon as I put
the controls too close together, the spacing between each row is not
the same - I need the each row to be directly under the other, with no
line spacing unless a space has been left on the report. The
line-spacing when viewing the report is fine, but as soon as it is e-mailed as
an attachment, the .txt attachment's line spacing is irregular - I
would really appreciate a solution to this problem. Many thanks
Hi Tony,
Many thanks for your response ...
The end-users are using different e-mail applications so the format
will have to be application non-specific. Is there any way to force the
format of an attachment regardless of the e-mail application used to
send?
Thank you This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: James Turner |
last post by:
I am trying to store formatted text (windows format) into a MySQL
database and then retrieve it. The field in the database is a
varchar. I cut and paste the test into a form field formatted, then...
|
by: Lee |
last post by:
As the subject states, I have been playing in the system trying to
figure out a method of using a report as the email body text.
So far, the closest I have come is the acFormatHTML. However,...
|
by: bfowlkes |
last post by:
Hello,
I am trying to parse two pre-formatted text files and write them to a
different files formatted in a different way. The story about this is I
was hired along with about 20 other people...
|
by: sonu |
last post by:
I am getting some data 'strData' from database through reader object.
The data 'strData' is sent to a doc using FilesystemObject line by line
in doc file located on a specific location.
1.Code...
|
by: k.visube |
last post by:
In my ASP application,i need to send a formatted text mail (i.e with
newline characters).
here in my application i used a function in javascript which construts
the mail body
sample snippet
...
|
by: pkirk25 |
last post by:
My data is in a big file that I have no control over. Sometimes its
over 30 MB and often there are several of them.
It is machine generated and is nicely formatted. Example text follows:
...
|
by: NEWSGROUPS |
last post by:
I have data in a table in an Access 2000 database that needs to be exported
to a formatted text file. For instance, the first field is an account number
that is formatted in the table as text and...
|
by: EricBlair |
last post by:
Hello,
Wondering if someone might help on this...
I write out formatted text to a file then load it into a RichTextBox.
However the text that is formatted into a table displays like this...
|
by: wpflum |
last post by:
I'm using Net::POP3, Email:Simple and Email::Mime to pull emails off of a server and parse them for information to see if they are the result of 'bounced' emails from our system. I then send an email...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |