double merge

C

Curt

made the following macro got almost all I want except. When it goes to
printer is the problem. What I am after is for it to go to printer without
user input. Presently it stops at the screen for the printer options. If you
choose properties to get next screen for fast draft when you check ok it
injects all the merge fields above the ones in place. These are in a straight
line not above one another as those all ready in place. Somwhere in the
action to printer sec0ond set of fields appear. Got pass the selection for
the excel sheet needed. now double merge HELP
Thanks
I have left in all of my (') lines after it works right I will clean tyhem out
Here it is Also I ask does it matter the order of the fields as they place
on letterhead in the macro. It would seem that the placement on doc is the
factor.
Thanks to all Heres hopeing

Sub Macro3()

'
' Macro3 Macro
' Macro recorded 7/21/2007 by Curtiss A. Greer
'
ChangeFileOpenDirectory "C:\Parade"
Documents.Open FileName:="LetterHead.doc", ConfirmConversions:=False, _
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto = 0
' Selection.TypeParagraph
ActiveDocument.MailMerge.MainDocumentType = wdFormLetters
ActiveDocument.MailMerge.OpenDataSource Name:="C:\Parade\MailEcopy.xls", _
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _
Format:=wdOpenFormatAuto, Connection:="entire sheet",
SQLStatement:="", SQLStatement1 _
:=""
ActiveDocument.MailMerge.EditMainDocument
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"Contact_Person"
' Selection.TypeParagraph
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"Address"
' Selection.TypeParagraph
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:= _
"CityState"
' Selection.TypeText Text:=" "
ActiveDocument.MailMerge.Fields.Add Range:=Selection.Range, Name:="Zip_"
' Selection.TypeText Text:=vbTab & vbTab & vbTab & vbTab & vbTab & vbTab
& _
' vbTab
Selection.InsertDateTime DateTimeFormat:="M/d/yyyy",
InsertAsField:=True, _
DateLanguage:=wdEnglishUS, CalendarType:=wdCalendarWestern, _
InsertAsFullWidth:=False
ActiveDocument.MailMerge.DataSource.QueryString = _
"SELECT * FROM C:\Parade\MailEcopy.xls WHERE ((Contact_Person IS NOT
NULL ))" & ""
With ActiveDocument.MailMerge
.Destination = wdSendToPrinter
' .MailAsAttachment = False
' .MailAddressFieldName = ""
' .MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = wdDefaultFirstRecord
.LastRecord = wdDefaultLastRecord
End With
.Execute Pause:=True
End With
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top