ich möchte aus Excel heraus ein Word-Vba Makro aufrufen, das ich in einer Word-Datei gespeichert habe. Geht das auch irgendwie mit Application.run ...
Vielen Dank im voraus ......
Sub WordMakro()
Dim appWord As Object
Dim sFile As String
sFile = Range("B1").Value 'in B1 steht der Pfad und Worddokument
If Dir(sFile) = "" Then
Beep
MsgBox "Word-Dokument wurde nicht gefunden!"
Else
Set appWord = CreateObject("Word.Application")
appWord.Documents.Open sFile
appWord.Run "Project.Modul1."
appWord.Quit
Set appWord = Nothing
End If
End Sub