Sub ExcelDatenNachWord()
24.02.2005 13:44:38
Jürg
habe diesen code bekommen , leider funzt er nicht.,bei
Dim wdapp As Word.Application meldet er "Fehler beim kompilieren"
kann mir jemand nen typ geben?
besten Dank
Gruss
Jürg
Sub ExcelDatenNachWord()
Dim wdapp As Word.Application
Dim wdDok As Word.Document
Dim xlZelle As Range
Dim intZeile As Integer
Set xlZelle = ActiveCell
intZeile = xlZelle.Row
If Cells(intZeile, 1).Value = "" Then
MsgBox "Der Cursor wurde nicht richtig platziert!"
Exit Sub
End If
Set wdapp = Word.Application
Set wdDok = wdapp.Documents.Add("Testvorl.dot")
With wdapp
With .Selection
.GoTo what:=wdGoToBookmark, Name:="Name"
TypeParagraph
TypeText Text:=Cells(intZeile, 3).Value
End With
End With
Set wdapp = Nothing
Set wdDok = Nothing
Set xlZelle = Nothing
End Sub