Wrox Programmer Forums
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 9th, 2006, 03:49 AM
Authorized User
Join Date: Apr 2006
Posts: 53
Thanks: 0
Thanked 0 Times in 0 Posts
Default Mailto string and concat

Hi all,
How can I use writeline to concat a mail string? I have a dbase with for example 5 e-mail addresses. When using writeline method I get the 5 mail addresses below each other. How can I get these 5 mail addresses in one string for example:
"address1@test.com; address2@test.com; address3@test.com; address4@test.com; address5@test.com"



Old August 10th, 2006, 12:40 PM
Friend of Wrox
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts

What does "writeline" return? Where are you using writeline from? Is it from a command prompt? Where are the addresses stored? Is there another way to get them?

In any event, when you call whatever you are calling to get the addresses, if you are getting one at a time, you need to concatenate the output like this:

sMailTo = sMailTo & ";" & writeline

Then you will need to remove the last ; from the line after you get all the addresses. Maybe

sMailTo = Left(sMailTo, (Len(sMailTo) - 1))



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailto: sportkr HTML Code Clinic 4 July 30th, 2008 03:21 PM
How to do Very Large String Concat? EcceBozo XSLT 2 July 29th, 2008 03:58 PM
String.Concat NOT same as '&" Ron Howerton Visual Basic 2005 Basics 0 November 21st, 2006 04:34 PM
Mailto: paul20091968 Word VBA 2 September 29th, 2006 04:06 AM
Strange string concat edislasm Javascript How-To 2 September 6th, 2005 02:17 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.