Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / March 2004

Tip: Looking for answers? Try searching our database.

HELP! MailMergePropagateLabel

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
GhLzN@ - 29 Mar 2004 16:40 GMT
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
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.