mit folgender Routine starte ich word aus einer Excel-Userform:
Sub WordAufrufen()
On Error Resume Next
Set ObjWord = GetObject("Word.Application")
If ObjWord Is Nothing Then
Set ObjWord = CreateObject("Word.Application")
ObjWord.Visible = True
End If
On Error GoTo 0
If Not ObjWord Is Nothing Then
Set DocNeu = ObjWord.Documents.Add(Template:= _
Workbooks("Jutta.xls").Sheets("Konstanten").Range("aLW").Value _
& Workbooks("Jutta.xls").Sheets("Konstanten").Range("Vorlagen").Value _
& Workbooks("Jutta.xls").Sheets("Konstanten").Range("Brief").Value)
End If
With DocNeu
End Sub
Funktioniert prima!
Wie kann ich erreichen, dass als Dateiname des Worddokuments nicht "Dokument
Für eine Antwort recht herzlichen Dank.
Mit freundlichen Grüßen
Albrecht