Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Mail merge adds "mailto:" to email addr

Geek News

Mail merge adds "mailto:" to email addr
Ray Egan <raypost[ at ]pacbell.net> 10/5/2008 7:10:12 PM
Word 2007 mailmerge field "email" from Access 2007 adds the extra
#mailto:...# to the email address. How do I prevent it? The Access 2007
database is clean.

Example:
leafpatrol[ at ]fllha.org#mailto:leafpatrol[ at ]fllha.org#

Thanks, Ray
Re: Mail merge adds "mailto:" to email addr
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> 10/6/2008 4:56:10 AM
I suggest you try creating an Access query that extraxts everything before
the first # character, and use that as the data source.

e.g. try a query such as

SELECT *, left(myfield & '#', instr(myfield & '#','#')-1) AS [myaddress]
FROM mytable

where "myfield" is the field containing the e-mail address.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Ray Egan" <raypost[ at ]pacbell.net> wrote in message
news:Xns9B2E7BCBDBC93regancomputerorg[ at ]207.115.33.102...
[Quoted Text]
> Word 2007 mailmerge field "email" from Access 2007 adds the extra
> #mailto:...# to the email address. How do I prevent it? The Access 2007
> database is clean.
>
> Example:
> leafpatrol[ at ]fllha.org#mailto:leafpatrol[ at ]fllha.org#
>
> Thanks, Ray

Re: Mail merge adds "mailto:" to email addr
Ray Egan <raypost[ at ]pacbell.net> 10/6/2008 5:18:02 AM
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in
news:eN$Nc$2JJHA.1160[ at ]TK2MSFTNGP05.phx.gbl:

[Quoted Text]
> I suggest you try creating an Access query that extraxts everything
> before the first # character, and use that as the data source.
>
> e.g. try a query such as
>
> SELECT *, left(myfield & '#', instr(myfield & '#','#')-1) AS
> [myaddress] FROM mytable
>
> where "myfield" is the field containing the e-mail address.
>

If I copy the datasheet query and then paste it into an excel spreadsheet
it works properly in the mailmerge -- that is the #mailto:...# is not
appended to the email address.

It appears that the connection between Word mailmerge and the Access
database/query is where the mailto is added.
Re: Mail merge adds "mailto:" to email addr
"Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> 10/6/2008 7:43:36 AM
My guess is that your email address is stored in a field in Access that has
field type Hyperlink. If that is the case (and perhaps even if it is not, in
some cases) then what is actually stored in the database is the text with
the hash characters in it. That's because Access is trying to store both the
"link text" (i.e. the actual address) and the "display text" (i.e. the
hyperlink it displays in blue).

In other words, it isn't Word that adds this stuff - it's there in the
database. However, Access knows to strip the "link text" out when it
displays the link and just use the display text, whereas Word just gets data
from Access and treats the hyperlink field as if it is a text field, so it
doesn't try to strip the extra stuff out.

When you copy the data from Access's display into something else, you'll
probably just get the display data. But even in Excel, if you connected to
the database from Excel using Data->get External Data->From Access, I
suspect you would see exactly what you are seeing in Word.

The question, though, is what to do about it. In this case, the
frequently-used workaround of connecting to Access using DDE does not work
as far as I know - all connection methods return the text with the hash
characters. So I think you have two choices:
a. copy the data somewhere else in the way that you are doing, and use that
as the data source for your merge.
b. get rid of the additional hyperlink data using an approach along the
lines I suggested.

FWIW, the main problem with either of these things will be what happens if
you end up extracting the "display text" rather than the "link text" and
your e-mail software cnanot recognise the e-mail address. It may be that
what is needed is the text between the two # characters rather than the text
to the left of the first character. But perhaps the existing suggestion will
do for now.

--
Peter Jamieson
http://tips.pjmsn.me.uk

"Ray Egan" <raypost[ at ]pacbell.net> wrote in message
news:Xns9B2EE2D8287Bregancomputerorg[ at ]207.115.33.102...
[Quoted Text]
> "Peter Jamieson" <pjj[ at ]KillmapSpjjnet.demon.co.uk> wrote in
> news:eN$Nc$2JJHA.1160[ at ]TK2MSFTNGP05.phx.gbl:
>
>> I suggest you try creating an Access query that extraxts everything
>> before the first # character, and use that as the data source.
>>
>> e.g. try a query such as
>>
>> SELECT *, left(myfield & '#', instr(myfield & '#','#')-1) AS
>> [myaddress] FROM mytable
>>
>> where "myfield" is the field containing the e-mail address.
>>
>
> If I copy the datasheet query and then paste it into an excel spreadsheet
> it works properly in the mailmerge -- that is the #mailto:...# is not
> appended to the email address.
>
> It appears that the connection between Word mailmerge and the Access
> database/query is where the mailto is added.

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net