The code is as follows:
Sub PrintAndImage()
'batch name = PrintAndImageFrm.TextBox3.Value
'build end batch pages
Documents(PrintAndImageFrm.TextBox3.Value).Activate
Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
ChangeFileOpenDirectory _
"J:\Protection-Customer-Service\Technical Support\MacroFiles\"
Selection.InsertFile FileName:= _
"BaseLetterEndBatch.doc", Range:="", _
ConfirmConversions:=False, Link:=False, Attachment:=False
Selection.HomeKey Unit:=wdStory
Documents(PrintAndImageFrm.TextBox3.Value).Activate
UpdateBatchPage
Documents(PrintAndImageFrm.TextBox3.Value).Activate
'build start batch pages
Selection.HomeKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
Selection.HomeKey Unit:=wdStory
ChangeFileOpenDirectory _
"J:\Protection-Customer-Service\Technical Support\MacroFiles\"
Selection.InsertFile FileName:= _
"BaseLetterStartBatch.doc", Range:="", _
ConfirmConversions:=False, Link:=False, Attachment:=False
Selection.HomeKey Unit:=wdStory
UpdateBatchPage
'run print & image option
If PrintAndImageFrm.OptionButton1.Value = True Or
PrintAndImageFrm.OptionButton2.Value = True Then
ChangeFileOpenDirectory _
"J:\Protection-Customer-Service\Technical
Support\MacroFiles\Central Printing\To be Printed\"
Dim myDate As String
myDate = Format(Date, "yyMMdd")
Dim MyTime As String
MyTime = Format(Time, "hhmmss")
Dim myFile As String
myFile = PrintAndImageFrm.TextBox3.Value
Dim newFile As String
newFile = myDate + MyTime + " " + myFile
ActiveDocument.SaveAs FileName:=newFile
WRKITEMIMAGER
End If
The WRKITEMIMAGER is a seperate piece of coding which will automtically
'image the word document' to a seperate systme. I don't belive that
this is related to the problem