Hallo,
meine derzeitige Code sieht so aus. Aber es klappt leider immer noch nicht. Es wird nichts angezeigt.
Sub ExportToWord()
Dim wordapp As New Word.Application
Dim doc As Word.Document
Dim strA As String
wordapp.Visible = True
Set doc = wordapp.Documents.Open("Pfad")
Dim LetzteZeile As Long
Dim i As Integer
LetzteZeile = Cells(Rows.Count, 1).End(xlUp).Row
For i = LetzteZeile To 11 Step -1
If Tabelle1.Cells(i, 1).Value = "Vorname" And Tabelle1.Cells(i, 1).Value = "Nachname" Then
strA = Cells(i, 2) & " " & Cells(i, 3)
doc.Bookmarks("Anschrift").Range.Text = strA
End If
Next i
End Sub
Sollte ungefähr so aussehen: Sara S
Christine CH
....
Danke
|