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

Re: double merge by Doug

Doug
Thu Aug 02 05:11:47 CDT 2007

See the article "How to do a mail merge to the printer using VBA, without
displaying the Print dialog" at:

http://www.word.mvps.org/FAQs/MailMerge/MergeStraightToPrintrWVBA.htm


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Curt" <Curt@discussions.microsoft.com> wrote in message
news:CC1CF31F-B776-4058-85D5-9BD18655D9B9@microsoft.com...
> 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
>
>
>



Re: double merge by Curt

Curt
Thu Aug 02 13:46:01 CDT 2007

Thanks for the direction You people know where it si
Thanks Again

"Doug Robbins - Word MVP" wrote:

> See the article "How to do a mail merge to the printer using VBA, without
> displaying the Print dialog" at:
>
> http://www.word.mvps.org/FAQs/MailMerge/MergeStraightToPrintrWVBA.htm
>
>
> --
> Hope this helps.
>
> Please reply to the newsgroup unless you wish to avail yourself of my
> services on a paid consulting basis.
>
> Doug Robbins - Word MVP
>
> "Curt" <Curt@discussions.microsoft.com> wrote in message
> news:CC1CF31F-B776-4058-85D5-9BD18655D9B9@microsoft.com...
> > 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
> >
> >
> >
>
>
>