Discussion:
Word-Datei in VBA öffnen.
(zu alt für eine Antwort)
Herve
2004-01-07 12:53:51 UTC
Permalink
Hallo,
ich programmiere gerade in Excel-VBA.
Wie kann man hier eine Word-Datei öffnen??
Danke
stefan onken
2004-01-07 13:15:10 UTC
Permalink
hallo herve,

Shell _
"c:\programme\microsoft office\office10\winword.exe _
D:test.doc", 1

der Pfad zu winword.exe ist dabei abhängig von der Office-
Version.

Flexibler ist da

Dim appWord As Object
Set appWord = CreateObject("word.application")
appWord.Documents.Open "D:\test.doc"
appWord.Application.Visible = True

So kann man Word von Excel aus auch "fernsteuern".

Gruß
stefan
-----Originalnachricht-----
Hallo,
ich programmiere gerade in Excel-VBA.
Wie kann man hier eine Word-Datei öffnen??
Danke
.
Herve
2004-01-07 13:35:52 UTC
Permalink
DANKE.
Hat mir sehr geholfen.
-----Originalnachricht-----
hallo herve,
Shell _
"c:\programme\microsoft office\office10\winword.exe _
D:test.doc", 1
der Pfad zu winword.exe ist dabei abhängig von der Office-
Version.
Flexibler ist da
Dim appWord As Object
Set appWord = CreateObject("word.application")
appWord.Documents.Open "D:\test.doc"
appWord.Application.Visible = True
So kann man Word von Excel aus auch "fernsteuern".
Gruß
stefan
-----Originalnachricht-----
Hallo,
ich programmiere gerade in Excel-VBA.
Wie kann man hier eine Word-Datei öffnen??
Danke
.
.
Loading...