Pessoal, estou com um problema, tenho um formulário onde contem alguns campos que geram um relatório no word através do código vba, os campos texto o código esta levando e gerando o documento de forma correta, porém neste mesmo formulário tenho um campo que visualiza uma imagem através do vínculo de imagem também via código do vba esse campo da imagem não esta sendo levado para o word, como faço para acertar esse código, segue abaixo o código mencionado.
Dim AppWord As Object, strFinalDoc As String
strFinalDoc = CurrentProject.path & "\TEB17010-12.doc"
Set AppWord = CreateObject("Word.Application")
AppWord.visible = False
Set DocWord = AppWord.Documents.Add(strFinalDoc)
With DocWord.Content.Find
.Execute findtext:="[PACIENTE]", replacewith:=(Forms!frmCadMacro2!Empresa), Format:=True, Replace:=2
.Execute findtext:="[informes]", replacewith:=(Forms!frmCadMacro2!informe), Format:=True, Replace:=2
.Execute findtext:="[macro]", replacewith:=(Forms!frmCadMacro2!macro), Format:=True, Replace:=2
'.Execute findtext:="[micro]", replacewith:=(Forms!frmCadMacro2!micro), Format:=True, Replace:=2
'.Execute findtext:="[diagnostico]", replacewith:=(Forms!frmCadMacro2!macro), Format:=True, Replace:=2
.Execute findtext:="[dataconc]", replacewith:=(Forms!frmCadMacro2!agd_data), Format:=True, Replace:=2
.Execute findtext:="[pedido]", replacewith:=(Forms!frmCadMacro2!npedido), Format:=True, Replace:=2
.Execute findtext:="[exame]", replacewith:=(Forms!frmCadMacro2!Serviço), Format:=True, Replace:=2
.Execute findtext:="[DTPRO]", replacewith:=(Forms!frmCadMacro2!agd_data), Format:=True, Replace:=2
.Execute findtext:="[CODPROC]", replacewith:=(Forms!frmCadMacro2!codproc), Format:=True, Replace:=2
.Execute findtext:="[SX]", replacewith:=(Forms!frmCadMacro2!sexo), Format:=True, Replace:=2
.Execute findtext:="[NASC]", replacewith:=(Forms!frmCadMacro2!nascimento), Format:=True, Replace:=2
.Execute findtext:="[CONV]", replacewith:=(Forms!frmCadMacro2!Empresa_tblconvenio), Format:=True, Replace:=2
.Execute findtext:="[SOLICITANTE]", replacewith:=(Forms!frmCadMacro2!Nome), Format:=True, Replace:=2
.Execute findimage:="[FIG1]", replacewith:=(Forms!frmImagem!Foto1), Format:=True, Replace:=2
.Execute imac:="[FIG1]", replacewith:=(Forms!frmImagem!Foto1), Format:=True, Replace:=2
.Execute findtext:="[FIG2]", replacewith:=(Forms!frmImagem!Foto2), Format:=True, Replace:=2
.Execute findtext:="[FIG3]", replacewith:=(Forms!frmImagem!Foto3), Format:=True, Replace:=2
.Execute findtext:="[FIG4]", replacewith:=(Forms!frmImagem!Foto4), Format:=True, Replace:=2
.Execute findtext:="[FIG5]", replacewith:=(Forms!frmImagem!Foto5), Format:=True, Replace:=2
.Execute findtext:="[FIG6]", replacewith:=(Forms!frmImagem!Foto6), Format:=True, Replace:=2
DoEvents
If MsgBox("Tem certeza que deseja imprimir o documento? " & vbCrLf, vbExclamation + vbYesNo, "Confirme") = vbYes Then
AppWord.PrintOut
End If
DocWord.Close False
Set DocWord = Nothing
End With
AppWord.Quit
Set AppWord = Nothing
End If
End Sub
Dim AppWord As Object, strFinalDoc As String
strFinalDoc = CurrentProject.path & "\TEB17010-12.doc"
Set AppWord = CreateObject("Word.Application")
AppWord.visible = False
Set DocWord = AppWord.Documents.Add(strFinalDoc)
With DocWord.Content.Find
.Execute findtext:="[PACIENTE]", replacewith:=(Forms!frmCadMacro2!Empresa), Format:=True, Replace:=2
.Execute findtext:="[informes]", replacewith:=(Forms!frmCadMacro2!informe), Format:=True, Replace:=2
.Execute findtext:="[macro]", replacewith:=(Forms!frmCadMacro2!macro), Format:=True, Replace:=2
'.Execute findtext:="[micro]", replacewith:=(Forms!frmCadMacro2!micro), Format:=True, Replace:=2
'.Execute findtext:="[diagnostico]", replacewith:=(Forms!frmCadMacro2!macro), Format:=True, Replace:=2
.Execute findtext:="[dataconc]", replacewith:=(Forms!frmCadMacro2!agd_data), Format:=True, Replace:=2
.Execute findtext:="[pedido]", replacewith:=(Forms!frmCadMacro2!npedido), Format:=True, Replace:=2
.Execute findtext:="[exame]", replacewith:=(Forms!frmCadMacro2!Serviço), Format:=True, Replace:=2
.Execute findtext:="[DTPRO]", replacewith:=(Forms!frmCadMacro2!agd_data), Format:=True, Replace:=2
.Execute findtext:="[CODPROC]", replacewith:=(Forms!frmCadMacro2!codproc), Format:=True, Replace:=2
.Execute findtext:="[SX]", replacewith:=(Forms!frmCadMacro2!sexo), Format:=True, Replace:=2
.Execute findtext:="[NASC]", replacewith:=(Forms!frmCadMacro2!nascimento), Format:=True, Replace:=2
.Execute findtext:="[CONV]", replacewith:=(Forms!frmCadMacro2!Empresa_tblconvenio), Format:=True, Replace:=2
.Execute findtext:="[SOLICITANTE]", replacewith:=(Forms!frmCadMacro2!Nome), Format:=True, Replace:=2
.Execute findimage:="[FIG1]", replacewith:=(Forms!frmImagem!Foto1), Format:=True, Replace:=2
.Execute imac:="[FIG1]", replacewith:=(Forms!frmImagem!Foto1), Format:=True, Replace:=2
.Execute findtext:="[FIG2]", replacewith:=(Forms!frmImagem!Foto2), Format:=True, Replace:=2
.Execute findtext:="[FIG3]", replacewith:=(Forms!frmImagem!Foto3), Format:=True, Replace:=2
.Execute findtext:="[FIG4]", replacewith:=(Forms!frmImagem!Foto4), Format:=True, Replace:=2
.Execute findtext:="[FIG5]", replacewith:=(Forms!frmImagem!Foto5), Format:=True, Replace:=2
.Execute findtext:="[FIG6]", replacewith:=(Forms!frmImagem!Foto6), Format:=True, Replace:=2
DoEvents
If MsgBox("Tem certeza que deseja imprimir o documento? " & vbCrLf, vbExclamation + vbYesNo, "Confirme") = vbYes Then
AppWord.PrintOut
End If
DocWord.Close False
Set DocWord = Nothing
End With
AppWord.Quit
Set AppWord = Nothing
End If
End Sub