para fazer funcionar vc tem que ir em referncias e marcar o microsoft word 9.0 library ....ou superior
Dim WordApp As Word.Application ' Para carregar e configurar o aplicativo Word
Dim WordDoc As Word.Document ' Para criar e salvar um arquivo *.doc
Dim objMyRange As Object ' Posicao da ultima linha
Dim cont As Integer
'--------------------------------------------
'esta variavel exorta o conteudo do checkBox
'para o Word
Dim retorno As String
'****************************************
Set WordApp = CreateObject("Word.Application")
Set WordDoc = WordApp.Documents.Add
With WordApp
.Visible = True 'habilita visualização do word
' .Documents.Add DocumentType:=wdNewBlankDocument
'Tamanho da Fonte
.Selection.Font.Size = "16"
'Alinhamento do Texto - Centralizado
.Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
'Negrito
.Selection.Font.Bold = True
'Sublinhado
.Selection.Font.Underline = True
.Selection.TypeText Text:=LblTituloNoWord.Caption
'Sublinhado
.Selection.Font.Underline = False
'Negrito
.Selection.Font.Bold = False
'Enter
.Selection.TypeParagraph
'Alinhamento do Texto - Esquerda
.Selection.ParagraphFormat.Alignment = wdAlignParagraphLeft
'Tamanho da Fonte
.Selection.Font.Size = "10"
.Selection.TypeParagraph
.Selection.TypeText Text:=lblcod.Caption & ": " & txtcod.Text 'Escreve no word
.Selection.TypeParagraph
.Selection.TypeText Text:=Label1.Caption & ": " & txtcodimo.Text 'Escreve no word
.Selection.TypeParagraph
.Selection.TypeText Text:=Label12.Caption & ": " & txtCaptador.Text 'Escreve no word
.Selection.TypeParagraph
.Selection.TypeText Text:=Label9.Caption & ": " & txtcor.Text 'Escreve no word
.Selection.TypeParagraph
.Selection.TypeText Text:=lblident.Caption & ": " & txtid.Text 'Escreve no word
.Selection.TypeParagraph
.Selection.TypeText Text:=lbln.Caption & ": " & txtnlote.Text 'Escreve no word
.Selection.TypeParagraph
.Selection.TypeText Text:=lblquadra.Caption & ": " & txtqu.Text
.Selection.TypeParagraph
'sair do word e libera as variaveis
'WordDoc.Close
'WordApp.Quit
'Set WordDoc = Nothing
'Set WordApp = Nothing
end sub
existe outras formas de levar dados pro word tambem , por exemplo es vc tiver um listbox que tenha checkbox , e vc queira levar o conteudos desses checkbox , entao vc tem que por assim ......
No frm load
With LISTCHECK
.AddItem "Venda"
.AddItem "Aluguel"
.Selected(0) = rslote("Venda")
.Selected(1) = rslote("Aluguel")
End With
e na rotina de expportacao
If LISTCHECK.Selected(0) = True Then
retorno = "Vende-se"
.Selection.TypeText Text:=Label13.Caption & ": " & retorno
.Selection.TypeParagraph
Else
retorno = ""
End If
If LISTCHECK.Selected(1) = True Then
retorno = "Aluga-se"
.Selection.TypeText Text:=Label13.Caption & ": " & retorno
.Selection.TypeParagraph
Else
retorno = ""
End If
e por ae vai, espero que te ajude