R
Reb
Hi All
I have a word form ready with the email header active in the document. When
I select Send on the email, the document remains open. I would like it
automatically close once the send button is hit. I found that the
ActiveWindow.EnvelopeVisible toggles the word email header.
I have got this far via the web but I really have no idea:
created a Class Module -clsobject:
Public WithEvents oApp As Word.Application
Private Sub oApp_DocumentChange()
' dunno what to put here
End Sub
created a module:
Dim oAppClass As New clsObject
Public Sub AutoExec()
Set oAppClass.oApp = Word.Application
If ActiveWindow.EnvelopeVisible = False Then
ActiveDocument.Close
End If
End Sub
Any ideas? Thanks in advance
I have a word form ready with the email header active in the document. When
I select Send on the email, the document remains open. I would like it
automatically close once the send button is hit. I found that the
ActiveWindow.EnvelopeVisible toggles the word email header.
I have got this far via the web but I really have no idea:
created a Class Module -clsobject:
Public WithEvents oApp As Word.Application
Private Sub oApp_DocumentChange()
' dunno what to put here
End Sub
created a module:
Dim oAppClass As New clsObject
Public Sub AutoExec()
Set oAppClass.oApp = Word.Application
If ActiveWindow.EnvelopeVisible = False Then
ActiveDocument.Close
End If
End Sub
Any ideas? Thanks in advance