Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mailmerge to email recipients
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Network:
Windows 2008 Server
Database:
MS SQL Server
Miscellaneous
Thread ID:
01362130
Message ID:
01362850
Views:
9
>Hi.
>I want to email to a no. of receipients , where email addresses are on a DBF file and
>attach a Word document (Letter does not necessarily need to be personalised).
>I've looked at Word2003 mailmerge , but it does not seem to support attachments
> if you are mailmerging via email.
>
>Any altrnative suggeations appreciated.
>Regards,
>Gerard

If as you said, "Letter does not necessarily need to be personalised", then why do you need mailmerge? You may just send email from Word, like:
*------------------------
oWord.documents.add
with oWord.ActiveDocument.MailEnvelope.Item
             .Attachments.Add(fullpath_doc_file)
               .Recipients.Add(.......)
                .Send
endwith
.......
And if you need mailmerge, then here is an example as it is seen in Word VBA Help:
*-------------------------------------
MailAsAttachment Property
True if the merge documents are sent as attachments when the mail merge destination is an e-mail message or a fax. Read/write Boolean.

expression.MailAsAttachment

expression Required. An expression that returns a MailMerge object.

Example
This example performs a mail merge operation and sends the merge results as attachments to e-mail messages. The e-mail addresses are stored in the MailAddress merge field.

With Documents("Main.doc").MailMerge
.MailAsAttachment = True
.Destination = wdSendToEmail
.MailSubject = "Special offer"
.MailAddressFieldName = "MailAddress"
.Execute
End With

*-------------------------------------

Good Luck
Previous
Reply
Map
View

Click here to load this message in the networking platform