T
tweacle
I have a macro which is shown below.
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:=""
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0
PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
ActiveDocument.Close
Documents.Open FileName:="Doc2.doc", ConfirmConversions:=False
ReadOnly:= _
False, AddToRecentFiles:=False, PasswordDocument:=""
PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:=""
WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto
With Selection.Tables(1)
With .Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderRight)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With
With Options
.DefaultBorderLineStyle = wdLineStyleSingle
.DefaultBorderLineWidth = wdLineWidth050pt
.DefaultBorderColor = wdColorAutomatic
End With
Application.PrintOut FileName:="", Range:=wdPrintAllDocument
Item:= _
wdPrintDocumentContent, Copies:=1, Pages:=""
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0
PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
ActiveDocument.Saved = True
ActiveDocument.Close
End Sub
The trouble is its closing the first document after its set up to prin
but dont make no changes by removing the colours when it prints the 2n
one. It then just completely freezes up and nothing happens. It say
on macro to same printer but will actually be printed to 2 seperat
printers.
Can anyone help as to why it keeps freezing. I also dont need it t
save changes when the colours removed. Can anyone help? Thank
Application.PrintOut FileName:="", Range:=wdPrintAllDocument, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:=""
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0
PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
ActiveDocument.Close
Documents.Open FileName:="Doc2.doc", ConfirmConversions:=False
ReadOnly:= _
False, AddToRecentFiles:=False, PasswordDocument:=""
PasswordTemplate:= _
"", Revert:=False, WritePasswordDocument:=""
WritePasswordTemplate:="", _
Format:=wdOpenFormatAuto
With Selection.Tables(1)
With .Shading
.Texture = wdTextureNone
.ForegroundPatternColor = wdColorAutomatic
.BackgroundPatternColor = wdColorAutomatic
End With
With .Borders(wdBorderLeft)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderRight)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderTop)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
With .Borders(wdBorderBottom)
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
.Color = wdColorAutomatic
End With
.Borders(wdBorderDiagonalDown).LineStyle = wdLineStyleNone
.Borders(wdBorderDiagonalUp).LineStyle = wdLineStyleNone
.Borders.Shadow = False
End With
With Options
.DefaultBorderLineStyle = wdLineStyleSingle
.DefaultBorderLineWidth = wdLineWidth050pt
.DefaultBorderColor = wdColorAutomatic
End With
Application.PrintOut FileName:="", Range:=wdPrintAllDocument
Item:= _
wdPrintDocumentContent, Copies:=1, Pages:=""
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0
PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
ActiveDocument.Saved = True
ActiveDocument.Close
End Sub
The trouble is its closing the first document after its set up to prin
but dont make no changes by removing the colours when it prints the 2n
one. It then just completely freezes up and nothing happens. It say
on macro to same printer but will actually be printed to 2 seperat
printers.
Can anyone help as to why it keeps freezing. I also dont need it t
save changes when the colours removed. Can anyone help? Thank