Estou com uma planilha criada para impressão de etiquetas que altera a numeração do volume sequencialmente e cria várias imagens em uma nova planilha para impressão. Só que eu precisava inserir uma quebra de página a cada imagem criada para que não desconfigure a impressão na máquina Zebra.Alguém consegue me ajudar?O código está assim:
Option Explicit
Sub Formatar_Impressão()
Dim vTl As Variant, i As Long, cLocal As Long: cLocal = 1
Dim ws As Worksheet: Set ws = Sheets("IMPRESSAO")
Dim rng As Range
Dim ct As Integer: ct = 0
DeleteAllPictures ' chama rotina que remove todas imgs
i = 1
vTl = InputBox("Por favor, digite o total de volumes!", "Valor Total de Volumes")
For i = i To vTl
Plan1.Range("C7").Value = i
Plan1.Range("E7").Value = vTl
Set rng = Plan1.Range("b1:g8")
With ws
rng.Copy
.Activate
.Range("A" & cLocal).Select
.Pictures.Paste
cLocal = cLocal + 17
ct = ct + 1
Application.CutCopyMode = False
End With
Next
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.Zoom = 99
.LeftMargin = Application.CentimetersToPoints(0)
.RightMargin = Application.CentimetersToPoints(0)
.TopMargin = Application.CentimetersToPoints(0)
.BottomMargin = Application.CentimetersToPoints(1.5)
.HeaderMargin = Application.CentimetersToPoints(0)
.FooterMargin = Application.CentimetersToPoints(0)
.CenterHorizontally = True
.CenterVertically = True
.Orientation = xlPortrait
End With
If ct > 0 Then
MsgBox " Foram inseridas " & ct & " Etiquetas", 0, "Sucesso"
Else
MsgBox "Nenhuma Etiqueta foi inserida! Verifique!", 64, "Atenção"
End If
End Sub
Private Sub DeleteAllPictures()
Dim ws As Worksheet: Set ws = Sheets("IMPRESSAO")
With ws
.Activate
.Pictures.Delete
End With
End Sub
Obrigada!