i have the following word vba codes which are running correctly
' Macro2 Macro
Documents.Open FileName:="testing.docx", AddToRecentFiles:=False
strSourceDoc = ActiveDocument.Path & "" & "fixedcharge.xls"
ActiveDocument.MailMerge.OpenDataSource Name:= _
Format:=wdOpenFormatAuto, Connection:= _
"Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=" & strSourceDoc & ";Mode=Read;Extended Properties=""HDR=YES;IMEX=1;"";Jet OLEDB:System database="""";Je" _
, SQLStatement:="SELECT * FROM `'Sheet$1'`", SQLStatement1:="", SubType _
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
.FirstRecord = ActiveDocument.MailMerge.DataSource.ActiveRecord
.LastRecord = ActiveDocument.MailMerge.DataSource.ActiveRecord
'ActiveDocument.SaveAs2 FileName:="SOW1.docx", FileFormat:= _
' wdFormatXMLDocument, Password:="", AddToRecentFiles _
End Sub [h=1][SIZE=12px]my problem is that in my excel sheet there are more than 1 records. When word document is saved to SOW1.docx, only one record is saved the others not saved.[/SIZE][/h] your help will be highly appreciated
Can anyone help me on this please.
I have my excel data sheet and my word document as per link below
My word document is already configured with the merge fields layout .I have to try mail merge on word but
unfortunately word application becomes "not responding" each time i try mail merge.
Can i have a vba code for the mail merge please.
your help will be very much appreciated
I refer to the above , there are individual names in my previous sheets. If i have both individual names and companies name instead .For individual names it's working fine but for comapnies it's not working
result should be "The Managing Director" in B6 and " your banking faciity "in C6.
can you help
thanks nilem . you are genius. you are a boss.
Can you amend my vba as per attached link
Cell A6 JOHN MR SMITH AND MR STEVE JACK result should be Dear Messrs in B6 and Banking Facilities in cell C6.