Mail Merge Option

A

Akash

Hi,

Can anyone help me in this. I know i am asking you for Microsoft
Office but if i get any solution i would be great-full.
How to send Copy of a mail to a specific id while using Mail Merge?
E.g. Mail Merge gives you a facility to send mails to respective
individual person, what i want is how to put an email id in CC
section.


Rgrds

Akash
 
A

Anthony

Hi,

I found a problem when merging information from the workbook currently
running the code to mail merge and the work around was to create a back up
of the file first and use that to link in the mail merge.

Sub print_Click()

Dim FName As String
Dim appWD As Object ' Word.Application
Dim UserN As String
Dim DesktopPath As String

On Error Resume Next

Application.StatusBar = "Starting mail merge ..."

'create a backup of the current workbook to use as the mail merge file
Application.DisplayAlerts = False
ThisWorkbook.SaveCopyAs ThisWorkbook.Path & "\addresses-backup.xls"
Application.DisplayAlerts = True

FName = Dir(ThisWorkbook.Path & "\addresses-backup.xls")

If appWD Is Nothing Then
Set appWD = CreateObject("Word.Application") ' New Word.Application
End If
appWD.Documents.Open Filename:=ThisWorkbook.Path & "\label
merge-auto.doc"

With appWD.ActiveDocument.MailMerge
.OpenDataSource Name:=ThisWorkbook.Path & "\" & FName,
sqlstatement:="SELECT * FROM [print list$]"
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
.Execute Pause:=False
End With

Application.StatusBar = "Now creating document for " & Left(FName,
Len(FName) - 4)

appWD.ActiveDocument.SaveAs (ThisWorkbook.Path & "\merged" &
Format(Date, "dd-mm-yyyy") & "-week" & _
Worksheets("label order").Range("Q4").Value),
FileFormat:=wdFormatDocument
appWD.ActiveDocument.Close


appWD.Documents("label merge-auto.doc").Close savechanges:=False

appWD.Quit

Set appWD = Nothing

'remove backup file
Kill ThisWorkbook.Path & "\addresses-backup.xls"

Application.StatusBar = False

End Sub

The code is lifted from mine and it was adapted for my use from an article
online. Please use as required..

Regards

Anthony
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top