Sub Mazcro1()
'
' Macro1 Macro
'
Dim base As String
base = "C:\Users\STAPLE\Documents\VBA_ESSAIS\basepub.xlsx"
Application.MailingLabel.DefaultPrintBarCode = False
Application.MailingLabel.CreateNewDocumentByID LabelID:="1359805912", _
Address:="", AutoText:="", LaserTray:=wdPrinterManualFeed, ExtractAddress _
:=False, PrintEPostageLabel:=False, Vertical:=False
With ActiveDocument.MailMerge
.MainDocumentType = wdMailingLabels
.OpenDataSource Name:=base, ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _
WritePasswordTemplate:="", Revert:=False, Format:=wdOpenFormatAuto, _
Connection:= _
"Provider=Microsoft.ACE.OLEDB.12.0;User ID=Admin;Data Source=C:\Users\STAPLE\Documents\VBA_ESSAIS\basepub.xlsx;Mode=Read;Extended Properties=""HDR=YES;IMEX=1;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Engine Type=37;Jet OLEDB:Data" _
, SQLStatement:="SELECT * FROM `Feuil1$`", SQLStatement1:="", SubType:= _
wdMergeSubTypeAccess
End With
ActiveDocument.Fields.Add Range:=Selection.Range, Type:= _
wdFieldAddressBlock, Text:= _
"\f ""<<_NICK0_" & Chr(13) & ">><<_COMPANY_" & Chr(13) & ">><<_STREET1_" & Chr(13) & ">><<_STREET2_" & Chr(13) & ">><<_POSTAL_ >><<_CITY_>><<" & Chr(13) & "_COUNTRY_>>"" \l 1036 \c 2 \e ""France"" \d"
WordBasic.MailMergePropagateLabel
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=False
End With
End Sub