Bom dia estou tentando imprimir varias procurações diferentes no word atraves do Excel VBA, porem esta dando erro 462, porem na explicação acima não conseguiir entender, me desculpem.
Te como alguem me ajuda, segue condigo abaixo:
Private Sub CommandButton1_Click()
Dim Word_VB As New Word.Application
Word_VB.Documents.Add
Word_VB.Visible = True
With Word_VB
.Selection.TypeParagraph
.Selection.TypeParagraph
.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
.Selection.Font.Name = "Times New Roman"
.Selection.Font.Size = 25
.Selection.Font.Bold = True
.Selection.Font.Italic = True
.Selection.Font.Underline = wdUnderlineSingle
.Selection.TypeText Text:="PROCURAÇÃO"
.Selection.TypeParagraph
.Selection.ParagraphFormat.Alignment = wdAlignParagraphJustify
.Selection.Font.Name = "Times New Roman"
.Selection.Font.Size = 12
.Selection.Font.Bold = False
.Selection.Font.Italic = False
.Selection.Font.Underline = False
.Selection.TypeText Text:=Plan9.Cells(3, 1).Value
.Selection.TypeText Text:=Plan9.Cells(3, 2).Value
.Selection.TypeText Text:=Plan9.Cells(4, 1).Value
.Selection.TypeText Text:=Plan9.Cells(5, 1).Value
.Selection.TypeText Text:=Plan9.Cells(6, 1).Value
.Selection.TypeText Text:=Plan9.Cells(7, 1).Value
.Selection.TypeText Text:=Plan9.Cells(8, 1).Value
.Selection.TypeText Text:=Plan9.Cells(9, 1).Value
.Selection.Font.Bold = True
.Selection.Font.Underline = True
.Selection.TypeText Text:=Plan9.Cells(10, 1).Value
.Selection.Font.Bold = False
.Selection.Font.Underline = False
.Selection.TypeText Text:=Plan9.Cells(11, 1).Value
.Selection.Font.Bold = True
.Selection.Font.Underline = True
.Selection.TypeText Text:=Plan9.Cells(12, 1).Value
.Selection.Font.Bold = False
.Selection.Font.Underline = False
.Selection.TypeText Text:=Plan9.Cells(13, 1).Value
.Selection.Font.Bold = True
.Selection.TypeText Text:=Plan9.Cells(14, 1).Value
.Selection.Font.Bold = False
.Selection.Font.Underline = False
.Selection.TypeText Text:=Plan9.Cells(15, 1).Value
.Selection.TypeText Text:=Plan9.Cells(16, 1).Value
.Selection.Font.Bold = True
.Selection.TypeText Text:=Plan9.Cells(17, 1).Value
.Selection.Font.Bold = False
.Selection.TypeText Text:=Plan9.Cells(18, 1).Value
.Selection.Font.Bold = True
.Selection.Font.Italic = True
.Selection.TypeText Text:=Plan9.Cells(19, 1).Value
.Selection.TypeText Text:=Plan9.Cells(20, 1).Value
.Selection.Font.Bold = False
.Selection.Font.Italic = False
.Selection.TypeText Text:=Plan9.Cells(21, 1).Value
.Selection.Font.Bold = True
.Selection.Font.Italic = True
.Selection.TypeText Text:=Plan9.Cells(22, 1).Value
.Selection.Font.Bold = False
.Selection.Font.Italic = False
.Selection.TypeText Text:=Plan9.Cells(23, 1).Value
.Selection.Font.Bold = True
.Selection.Font.Italic = True
.Selection.TypeText Text:=Plan9.Cells(24, 1).Value
.Selection.Font.Bold = False
.Selection.Font.Italic = False
.Selection.TypeText Text:=Plan9.Cells(25, 1).Value
.Selection.Font.Bold = True
.Selection.Font.Italic = True
.Selection.TypeText Text:=Plan9.Cells(26, 1).Value
.Selection.Font.Bold = False
.Selection.Font.Italic = False
.Selection.TypeText Text:=Plan9.Cells(27, 1).Value
.Selection.TypeParagraph
.Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
.Selection.Font.Bold = True
.Selection.Font.Italic = True
.Selection.ParagraphFormat.SpaceBefore = 0
.Selection.ParagraphFormat.SpaceBeforeAuto = False
.Selection.ParagraphFormat.SpaceAfter = 0
.Selection.TypeText Text:=Plan9.Cells(28, 1).Value
.Selection.TypeText Text:=Plan9.Cells(29, 2).Value
.Selection.TypeText Text:=Plan9.Cells(29, 3).Value
.Selection.TypeText Text:=Plan9.Cells(29, 5).Value
.Selection.TypeText Text:=Plan9.Cells(29, 6).Value
.Selection.TypeText Text:=Plan9.Cells(29, 7).Value
.Selection.TypeParagraph
.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
.Selection.Font.Bold = True
.Selection.Font.Italic = False
.Selection.TypeText Text:=Plan9.Cells(30, 1).Value
.Selection.TypeParagraph
.Selection.TypeParagraph
.Selection.TypeParagraph
.Selection.Font.Bold = True
.Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
.Selection.TypeText Text:=Plan9.Cells(31, 1).Value
.Selection.TypeText Text:=Plan9.Cells(31, 4).Value
.Selection.TypeText Text:=Plan9.Cells(31, 9).Value
.Selection.TypeParagraph
.Selection.TypeText Text:=Plan9.Cells(32, 1).Value
.Selection.TypeText Text:=Plan9.Cells(31, 4).Value
.Selection.TypeText Text:=Plan9.Cells(32, 9).Value
.Selection.TypeParagraph
.Selection.TypeText Text:=Plan9.Cells(33, 1).Value
.Selection.TypeText Text:=Plan9.Cells(31, 4).Value
.Selection.TypeText Text:=Plan9.Cells(33, 9).Value
.Selection.TypeParagraph
.Selection.TypeParagraph
.Selection.TypeParagraph
.Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
.Selection.Font.Name = "Arial Black"
.Selection.Font.Bold = True
.Selection.Font.Italic = True
.Selection.TypeText Text:=Plan9.Cells(2, 1).Value
.Selection.TypeText Text:=Plan9.Cells(2, 3).Value
.Selection.TypeText Text:=Plan9.Cells(2, 2).Value
.Selection.ParagraphFormat.LeftIndent = CentimetersToPoints(2)
.Selection.ParagraphFormat.RightIndent = CentimetersToPoints(2)
End With
ActiveDocument.PrintOut
Text1.Text = "c:\doc.doc"
Word_VB.Documents(Word_VB.ActiveDocument).SaveAs Text1.Text
Word_VB.Quit
Set Word_VB = Nothing
End Sub:shock: