Greetings!
Below is my code for printing 3 copies of a workbook, each "stamped" with a different label.
Sometimes, this code works. Most of the time, however, it will randomly place the WordArt somewhere on the worksheet, out of the print range. Can anyone please tell me why this is happening? It also prints it much larger than the 20 font I have set it to.
Any assistance would be greatly appreciated. Thanks!
Below is my code for printing 3 copies of a workbook, each "stamped" with a different label.
Code:
Sub Macro2()
For i = 3 To 1 Step -1
'On Error Resume Next
For Each Sh In Worksheets
If Sh.Name = "Sheet1" Then
a = 400
B = 575
Sh.Select
ElseIf Sh.Name = "Sheet2" Then
a = 570
B = 570
Sh.Select
End If
For Each shape In ActiveSheet.Shapes
If shape.Type = msoTextEffect Then
shape.Delete
End If
Next
ActiveSheet.Shapes.AddTextEffect(msoTextEffect2, "DCS CONTROLLED 00" & i, "Haettenschweiler", 20#, msoTrue, msoFalse, a, B).Select
Selection.ShapeRange.Fill.ForeColor.SchemeColor = 10
Selection.ShapeRange.Line.Visible = msoFalse
Next
ActiveWorkbook.PrintOut
Next
End Sub
Sometimes, this code works. Most of the time, however, it will randomly place the WordArt somewhere on the worksheet, out of the print range. Can anyone please tell me why this is happening? It also prints it much larger than the 20 font I have set it to.
Any assistance would be greatly appreciated. Thanks!