Daten von Excel nach Word
08.10.2006 13:22:57
Excel
Ich möchte gerne Daten aus Excel an einer bestimmten Stelle in ein Worddokument einfügen.
Mein bisheriger Code sieht so aus
Sub Exc_Wor()
On Error GoTo Ende
Dim objWord As Word.Application
Dim objWDDoc As Word.Document
On Error Resume Next
Set objWord = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Set objWord = CreateObject("Word.Application")
End If
With objWord
.Visible = True
.Documents.Add ActiveWorkbook.Path & "/Test.doc"
.Activate
.ActiveDocument.SaveAs Filename:=ordner & "\Testneu.doc"
objWord.Quit
Set objWord = Nothing
End With
Ende:
If Err.Number = 94 Then
objWord.Selection.Text = ""
Resume Next
End If
Exit Sub
End Sub
Weiß jemand wie der vba Code lauten muss?
Vielen Dank im Voraus
Gruß r-forty-five