T
tweacle
have a macro on word which comes up with run time error 5941. I have set
the macro up as shown below so it closes it down and re opens the
workbook. Im having probs still with the run time error. Can anyone
help? Part of macro shown below:-
ActivePrinter = "\\BLY-2116M9.slc.nxgrp.com\SDC Colour Inkjet"
Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
ActiveDocument.Save
ActiveDocument.Close
ChangeFileOpenDirectory "C:\Documents and Settings\networkb\Desktop\"
Documents.Open FileName:= _
"""\\BLY-SVR1\Shared data\County Control BLETCHLEY\WORD AT BLETCHLEY
CONTROL\WEATHER ITEMS\3 Day weather warning.doc""" _
, ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False,
_
PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
wdOpenFormatAuto, XMLTransform:=""
Selection.MoveDown Unit:=wdLine, Count:=8
With Selection.Tables(1)
With .Shading
Texture = wdTextureNone
ForegroundPatternColor = wdColorAutomatic
BackgroundPatternColor = wdColorAutomatic
End With
With .Borders(wdBorderLeft)
Many Thanks
Post 1 of 1
the macro up as shown below so it closes it down and re opens the
workbook. Im having probs still with the run time error. Can anyone
help? Part of macro shown below:-
ActivePrinter = "\\BLY-2116M9.slc.nxgrp.com\SDC Colour Inkjet"
Application.PrintOut FileName:="", Range:=wdPrintCurrentPage, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=True,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0
ActiveDocument.Save
ActiveDocument.Close
ChangeFileOpenDirectory "C:\Documents and Settings\networkb\Desktop\"
Documents.Open FileName:= _
"""\\BLY-SVR1\Shared data\County Control BLETCHLEY\WORD AT BLETCHLEY
CONTROL\WEATHER ITEMS\3 Day weather warning.doc""" _
, ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False,
_
PasswordDocument:="", PasswordTemplate:="", Revert:=False, _
WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _
wdOpenFormatAuto, XMLTransform:=""
Selection.MoveDown Unit:=wdLine, Count:=8
With Selection.Tables(1)
With .Shading
Texture = wdTextureNone
ForegroundPatternColor = wdColorAutomatic
BackgroundPatternColor = wdColorAutomatic
End With
With .Borders(wdBorderLeft)
Many Thanks
Post 1 of 1