möchte aus Excel Word starten un ein .doc aufmachen in dem ein Makro hinterlegt ist. Öffne ich im Windows Explorer die doc Datei wird die Datei mit Formatierung einwandfrei ausgefüllt angezeigt.
Öffne ich sie über Excel sind keine daten in der .doc Datei vorhanden.
das Makro in Excel sieht so aus.
Private Const Pfad = "C:\Angela\Dok15.doc"
Sub WordMitBestehendemDokumentStarten1()
Dim wdAnw As Object
Dim wdDok As Object
Set wdDok = GetObject(Pfad)
Set wdAnw = wdDok.Parent
wdAnw.Visible = True
wdAnw.WindowState = 1 '0 = Normal; 1 = Maximized; 2 = Minimized
wdAnw.Activate
Set wdDok = Nothing
Set wdAnw = Nothing
End Sub
Wie kann ich Word starten aus Excel, damit er alle daten anzeigt?
Mfg. Peter