473,320 Members | 1,840 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

How to format text box string to be used as body of an email

Hello everyone,

I'm trying to set up a quick newsletter add-on for a friend's system.
I've set it up so that the HTML headers and footers, the greeting and
mailing list pull through fine.

The bit I'm struggling with is getting the text from the multi-line
text box to display on separate lines without having to put in HTML
tags. The user wouldn't be comfortable with that, and would prefer it
to function as if it were a word processor.

I did a trawl of the sites and found a fix for vb.net

1.
Dim body As String = String.Join("<br>", myTextBox.Lines)

Is there a VBA version of this? I'm using Access 2000 and 2003.

Thanks,

Franc.
Jul 24 '08 #1
2 1717
On Thu, 24 Jul 2008 06:35:05 -0700 (PDT), franc sutherland
<fr**************@googlemail.comwrote:

I'm not sure I follow your logic. It seems you are saying you don't
want to put in HTML tags, then you're putting in <brtags?

Anyway, the Join and Split functions are available in VBA as well.

-Tom.
Microsoft Access MVP
>Hello everyone,

I'm trying to set up a quick newsletter add-on for a friend's system.
I've set it up so that the HTML headers and footers, the greeting and
mailing list pull through fine.

The bit I'm struggling with is getting the text from the multi-line
text box to display on separate lines without having to put in HTML
tags. The user wouldn't be comfortable with that, and would prefer it
to function as if it were a word processor.

I did a trawl of the sites and found a fix for vb.net

1.
Dim body As String = String.Join("<br>", myTextBox.Lines)

Is there a VBA version of this? I'm using Access 2000 and 2003.

Thanks,

Franc.
Jul 24 '08 #2
On Jul 24, 3:18 pm, Tom van Stiphout <no.spam.tom7...@cox.netwrote:
On Thu, 24 Jul 2008 06:35:05 -0700 (PDT), franc sutherland

<franc.sutherl...@googlemail.comwrote:

I'm not sure I follow your logic. It seems you are saying you don't
want to put in HTML tags, then you're putting in <brtags?

Anyway, the Join and Split functions are available in VBA as well.

-Tom.
Microsoft Access MVP
Hello everyone,
I'm trying to set up a quick newsletter add-on for a friend's system.
I've set it up so that the HTML headers and footers, the greeting and
mailing list pull through fine.
The bit I'm struggling with is getting the text from the multi-line
text box to display on separate lines without having to put in HTML
tags. The user wouldn't be comfortable with that, and would prefer it
to function as if it were a word processor.
I did a trawl of the sites and found a fix for vb.net
1.
Dim body As String = String.Join("<br>", myTextBox.Lines)
Is there a VBA version of this? I'm using Access 2000 and 2003.
Thanks,
Franc.
Hi Tom,
I was hoping to not have to type in the <br/tag to give line breaks
and instead have these programmatically added afterwards as the text
box content is copied across into the email. I couldn't get the Join
and String functions to work. Does the .lines property work in VBA?
Thanks,
Franc.
Jul 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: charlie_M | last post by:
I have the following code: <script type=text/javascript> function hide_tooltip(){ var hp = document.getElementById("tooltipper"); hp.style.left=0; hp.style.top=0; hp.style.width=1;...
5
by: ramonred | last post by:
Hi All, this is the error: Input string was not in a correct format. this is the code I am trying to debug: <code> string sql = @" INSERT INTO (UserID, Login, Password, FirstName, LastName,...
3
by: Ofir Amitai | last post by:
Hi, I have this very annoying problem: I'm trying to send email in html format through smtp but i always get it in text format. here is the code: MailMessage msgMail = new MailMessage();...
0
by: Klaus Bonadt | last post by:
I would like to parse an email, which I receive from a pop3 account. While the subject and the sender's email address are probably easy to determine, the body seems to be more difficult because of...
1
by: bidllc | last post by:
I'm working on a minor bug from an open source bug tracking system (bugtracket.net). It's a great app, but I don't want to bother the creator any more than I have to, so I thought I'd pose the...
1
by: B-Dog | last post by:
I've built a form that I want to use to email some of the information off it to a few users which will include a link to a folder on our network. I'm trying to send it in html format but when the...
7
by: tjonsek | last post by:
I'm building a string to be used as the body of an email. I'm getting this error message. "Input String Not In Correct Format". I've checked several newsgroups, however, for the posts I found...
16
by: anya | last post by:
Hey, I have a certain problem and till now I didnt find an answer on the web. I want to send an email message with picture in it. I dont want to put it as attachment but make it in the body of...
1
by: littlealex | last post by:
IE6 not displaying text correctly - IE 7 & Firefox 3 are fine! Need some help with this as fairly new to CSS! In IE6 the text for the following page doesn't display properly - rather than being...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
1
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.