Dans une macro de mailling de Word 2002, pour imprimer des ?tiquettes, j'ai un d?bugage sur :
MailMergePropagateLabel
Impossible ? d?bugger.
Voici la macro:
Sub Macro1()
'
' Macro1 Macro
' Macro enregistr?e le 29/03/2004 par Henri
'
ActiveDocument.MailMerge.MainDocumentType = wdMailingLabels
ActiveDocument.MailMerge.OpenDataSource Name:= _
"D:\Perso\ARSPM\Base de donn?es\ARPSM2.xls", ConfirmConversions:=False, _
ReadOnly:=False, LinkToSource:=True, AddToRecentFiles:=False, _
PasswordDocument:="", PasswordTemplate:="", WritePasswordDocument:="", _
WritePasswordTemplate:="", Revert:=False, Format:=wdOpenFormatAuto, _
Connection:= _
"Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=D:\Perso\ARSPM\Base de donn?es\ARPSM2.xls;Mode=Read;Extended Properties=""HDR=YES;IMEX=1;"";Jet OLEDB:System database="""";Jet OLEDB:Registry Path="""";Jet OLEDB:Database Password="""";Jet OLE" _
, SQLStatement:="SELECT * FROM `ListeDesEtiquettes`", SQLStatement1:="", _
SubType:=wdMergeSubTypeAccess
ActiveDocument.Fields.Add Range:=Selection.Range, Type:= _
wdFieldAddressBlock, Text:= _
"\f ""<<_TITLE0_ >><<_FIRST0_>><< _LAST0_>><< _SUFFIX0_>>" & Chr(13) & "<<_STREET1_" & Chr(13) & ">><<_STREET2_" & Chr(13) & ">><<_POSTAL_>><< _CITY_>><<" & Chr(13) & "_STATE_>>"" \l 1036 \c 0 \e """""
WordBasic.MailMergePropagateLabel --> VOICI L'ERREUR
With ActiveDocument.MailMerge
.Destination = wdSendToPrinter
.SuppressBlankLines = True
With .DataSource
.FirstRecord = 1
.LastRecord = 4
End With
.Execute Pause:=False
End With
ActiveWindow.ActivePane.LargeScroll Down:=-1
Merci de m'assister
Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS - 29 Mar 2004 23:29 GMT
I am not sure why you would try and do this with a macro.
However, If the error is Run-time error '509', it means that the
PropogateLabel command is being applied to a document that is not a mail
merge main document.

Signature
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.
Hope this helps
Doug Robbins - Word MVP
> Dans une macro de mailling de Word 2002, pour imprimer des ?tiquettes,
> j'ai un d?bugage sur :
[quoted text clipped - 46 lines]
>
> Merci de m'assister