
Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
Thanks a lot Doug Robbins,
It works perfect, only I get an error 5661
on the Execute line.
Because I don't need it, I've deleted it.
For me, when the proper values are already filled
in, that is more than enough.
The user will choose to click send or not.
One further question
can that macro automatically be done while opening
the doc.
Because know I've attached the macro to a button.
but I prefer to do it when the doc is opened ?
Thanks in advance
Kind Regards
christophe

Signature
\|||/
(o o)
----ooO-(_)-Ooo-------------
> Use the following code in a macro, substituting the relevant field name
> for the email addresses:
[quoted text clipped - 16 lines]
>> kind regards
>> christophe
Doug Robbins - Word MVP - 03 Feb 2006 18:48 GMT
That would necessitate you having:
1. The data source already attached to the document
2. The macro in the document.
Having the macro in the document will require that you respond to the Enable
macros in the document dialog box, so you are hardly gaining anything over
clicking on a button on a toolbar.
To prevent an error occuring if you were to click on the button when the
document was not a mailmerge main document with an attached datasource, you
probably should use:
With ActiveDocument
If .MailMerge.State = wdMainAndDataSource Then
.Destination = wdSendToEmail
.MailAddressFieldName = "Email"
.MailAsAttachment = True
End If
End With

Signature
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP
> Thanks a lot Doug Robbins,
>
[quoted text clipped - 35 lines]
>>> kind regards
>>> christophe
christophe - 06 Feb 2006 08:22 GMT
Ok,
Didn't think of that.
thanks a lot.
regards
christophe

Signature
\|||/
(o o)
----ooO-(_)-Ooo-------------
> That would necessitate you having:
>
[quoted text clipped - 57 lines]
>>>> kind regards
>>>> christophe