Posts by rakesh74

    Dear Guys


    Good Morning


    i have the following word vba codes which are running correctly


    Sub Macro2()
    '
    ' Macro2 Macro
    '
    Documents.Open FileName:="testing.docx", AddToRecentFiles:=False
    strSourceDoc = ActiveDocument.Path & "" & "fixedcharge.xls"
    ActiveDocument.MailMerge.OpenDataSource Name:= _
    strSourceDoc, _
    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 _
    :=wdMergeSubTypeAccess
    With ActiveDocument.MailMerge
    .Destination = wdSendToNewDocument
    .SuppressBlankLines = True
    With .DataSource
    .FirstRecord = ActiveDocument.MailMerge.DataSource.ActiveRecord
    .LastRecord = ActiveDocument.MailMerge.DataSource.ActiveRecord
    End With
    .Execute Pause:=False
    End With
    'ActiveDocument.SaveAs2 FileName:="SOW1.docx", FileFormat:= _
    ' wdFormatXMLDocument, Password:="", AddToRecentFiles _
    ':=True, CompatibilityMode:=14
    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


    thanks/regards


    rakesh

    Hello Guys,


    Can anyone help me on this please.


    I have my excel data sheet and my word document as per link below


    https://www.dropbox.com/s/my62tw9jsf...32018.xls?dl=0



    https://www.dropbox.com/s/h5wb91ymd3...flo1.docx?dl=0



    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


    thanks/regards


    rakesh

    Hi Nilem


    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


    For example


    ABC LTD
    CBD LTEE
    CAA LIMITED


    result should be "The Managing Director" in B6 and " your banking faciity "in C6.


    can you help


    thanks/regards


    rakesh