Double return

C

Curt

Built this macro with recorder. Can not see why I get first (2) lines of
return repeated. Changes Tools create envelope 2 to 1 diddent help. This was
done with blank envelope from start. Didnot open an existing file. Mail merge
recording. Merge works fine. Tried omit return to true no return then.
Checked return in Word not double.
Any pointers sure will help.
Thanks

Sub Macro2()
'
' Macro2 Macro
' Macro recorded January 22, 2008 by Curtiss A. Greer
'
ActiveDocument.MailMerge.MainDocumentType = wdEnvelopes
ActiveDocument.MailMerge.OpenDataSource Name:= _
"C:\Documents and Settings\Curtiss A.
Greer\Desktop\Parade\Parade.xls", _
ConfirmConversions:=False, ReadOnly:=False, LinkToSource:=True, _
AddToRecentFiles:=False, PasswordDocument:="", PasswordTemplate:="", _
WritePasswordDocument:="", WritePasswordTemplate:="", Revert:=False, _
Format:=wdOpenFormatAuto, Connection:= _
"DSN=Excel Files;DBQ=C:\Documents and Settings\Curtiss A.
Greer\Desktop\Parade\Parade.xls;DriverId=790;MaxBufferSize=2048;PageTimeout=5;" _
, SQLStatement:="SELECT * FROM `Data$`", SQLStatement1:=""
ActiveDocument.Envelope.Insert ExtractAddress:=False,
OmitReturnAddress:= _
False, PrintBarCode:=False, PrintFIMA:=False,
Height:=InchesToPoints(4.13 _
), Width:=InchesToPoints(9.5), Address:="", AutoText:= _
"ToolsCreateEnvelope2", ReturnAddress:= _
"Lane County Vetran's Day Parade Association" & Chr(13) & _
"P.O. Box 42147" & Chr(13) & "Eugene,Or 97404", ReturnAutoText:="", _
AddressFromLeft:=wdAutoPosition, AddressFromTop:=wdAutoPosition, _
ReturnAddressFromLeft:=wdAutoPosition, ReturnAddressFromTop:= _
wdAutoPosition, DefaultOrientation:=wdLeftLandscape,
DefaultFaceUp:=False
ActiveDocument.MailMerge.DataSource.QueryString = _
"SELECT * FROM `Data$` WHERE ((`Contact Person` IS NOT NULL ) AND
(`Amount` >= 10))" _
& ""
With ActiveDocument.MailMerge
.Destination = wdSendToNewDocument
.MailAsAttachment = False
.MailAddressFieldName = ""
.MailSubject = ""
.SuppressBlankLines = True
With .DataSource
.FirstRecord = 1
.LastRecord = 100
End With
.Execute Pause:=True
End With
ActiveWindow.Close
CommandBars("Stop Recording").Visible = False
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

Top