By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,477 Members | 1,641 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,477 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.