Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

<b>Formatting in TEXT Format</b>

Status
Not open for further replies.

paragvshah

Programmer
Jan 11, 2001
109
IN
I want to send mail in Text format using cdonts. I want to format the text to be sent, but i am having problem using vbtab. It doesn't allows multiple spaces between words. How do i format the text for this:

TYPE Price Quantity
----------------------------------------------------------
ABC 123 2
SDF 123 4

Please help me out how can i format the text. I dont want to use any HTML tags.

Parag.
 
This may actually be a problem with text mail. I remember a long long time ago that whitespace was not preserved in text emails. Try to send a text email to yourself and read it in a strictly text only reader. If this works thatn we have conclusively proven I am behind the times and I'll see what I can do to help :)
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
Try using the chr() function in VB instead of tabbing. Use chr(9) for Tab.


Proy
 
I have already tried sending the mail using Multiple vbtab and chr(9). But its not working. It shows only one whitespace between 2 words. so now how can i give multiple whitespaces. Pls help me out.

Parag.
 
Space(10) is also not working. It just shows 1 whitespace between 2 words. I am pasting the code that i have written for your perusal. If you have any suggestions.

Here is my code:

MyBody = MyBody & "You ordered the following items:"& vbnewline & vbnewline

MyBody = MyBody & space(10) & space(10) & space(10) & space(10) & space(10) & space(10) & space(10) & space(10) &"Qty."& vbtab & vbtab & vbtab & vbtab & vbtab & vbtab & vbtab &"Description"& vbtab & vbtab & vbtab & vbtab & vbtab & vbtab & vbtab & vbtab &"Price"& vbnewline

MyBody = MyBody & "--------------------------------------------"& vbnewline

I have tried using space(10), vbtab & chr(9)

Can any one help me out.

Thanks,

Parag.
 
I am at a loss as to why it would not work..


maybe seperate your information with dots

Type........Price.......Quanity
abc......... $10 ......... 5 ..

Kinda wierd to have to do it that way, but if it comes down to a last resort.

Jason www.vzio.com
ASP WEB DEVELOPMENT



 
Ok I'll have to use dots instead of spaces.

Thanks,

Parag.
 
Or make it even easier and do each item on a new line

....................
Type: ABC
Price: $10
Quanity: 6
....................
Type: DFG
Price: $20
Quanity: 6
....................


etc... www.vzio.com
ASP WEB DEVELOPMENT



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top