Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 125
Default Mail Merge Option

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Mail Merge Option


Ron De Bruin has two excellent articles on using Email with Excel and
VBA. they were so good mcrosoft put them on their webpage. See the
links below.


'Different Ways to Take Advantage of the E-mail Features of Excel'
(http://msdn.microsoft.com/en-us/libr...ffice.11).aspx)

'Working with Excel Workbooks and Worksheets in E-Mail'
(http://msdn.microsoft.com/en-us/library/bb268022.aspx)


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=170690

Microsoft Office Help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Mail Merge Option

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

"Akash" wrote in message
...
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Zip codes in mail merge - first digit doesn't display in merge Cheryl Excel Discussion (Misc queries) 1 December 22nd 09 08:13 PM
from where has to access mail merge option in MS Excel 2007 vara Excel Worksheet Functions 1 April 4th 09 04:52 PM
Mail merge macro: select recipients from Excel during merge Worksmart Excel Programming 0 May 18th 08 06:37 PM
Code launches Mail Merge but disables the Mail Merge austris Excel Discussion (Misc queries) 0 October 14th 06 01:11 AM
mail merge excludes my headers and critical data in Word merge Nix Excel Discussion (Misc queries) 0 April 21st 06 08:35 PM


All times are GMT +1. The time now is 05:50 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"