ich habe ein Mkro gefunden, mit dem man Wordokumente aus Excel hereua peichern kann. Leider funktioniert das nicht so, wie ich mir vorgestellt habe. Was mache ich falsch?
Sub amr()
pfadname = Range("A101")
Dim wd As Object
Set wd = CreateObject("word.Application")
Dim wrdFileName As String
monat = Range("A200")
Jahr = Format(Date, "YYYY")
Application.DisplayAlerts = False
wrdFileName = "http://.../"
& Jahr & monat & "/a_" & Range("A6") & _
".doc"
CreateObject("word.application").Documents.Open(wrdFileName).Application.Visible = True '
Set wdanw = CreateObject("Word.Application")
wdanw.Application.DisplayAlerts = False
wdanw.ActiveDocument.Save
wdAnd.Application.DisplayAlerts = True
End Sub
Gruß
marcl