F
fredvinzenz
hallo,
mein programm öffnet eine worddatei. dann kann mann diese bearbeiten
und abspeichern. wenn word geschlossen wird soll eine sub ausgeführt
werden.
kann mir jemand helfen?
Private WithEvents mAppEvents As word.ApplicationEvents2_Event
Private Sub word_open(ByVal dokname As String)
word = CreateObject("Word.Application")
word.Documents.Open(dokname)
word.Visible = True
word.Activate()
word = Nothing
mAppEvents = word
End Sub
Private Sub word_quit() Handles mAppEvents.DocumentEvents_Event_Close
// geht nur einmal
MsgBox("quit")
End Sub
mein programm öffnet eine worddatei. dann kann mann diese bearbeiten
und abspeichern. wenn word geschlossen wird soll eine sub ausgeführt
werden.
kann mir jemand helfen?
Private WithEvents mAppEvents As word.ApplicationEvents2_Event
Private Sub word_open(ByVal dokname As String)
word = CreateObject("Word.Application")
word.Documents.Open(dokname)
word.Visible = True
word.Activate()
word = Nothing
mAppEvents = word
End Sub
Private Sub word_quit() Handles mAppEvents.DocumentEvents_Event_Close
// geht nur einmal
MsgBox("quit")
End Sub