FrenchCAD
Mechanical
- Feb 8, 2002
- 321
I'm getting mad trying to make this. I can't get it working :
Private Sub App_WorkbookBeforeClose()
Dim Message
ActiveWorkbook.HasRoutingSlip = True
With ActiveWorkbook.RoutingSlip
.Delivery = xlAllAtOnce
.Recipients = Array("user1@mail", "user2@mail", "user3@mail"
.Subject = "Test"
.Message = "wooohoooo, it works"
End With
ActiveWorkbook.Route
If ActiveWorkbook.HasRoutingSlip And Not ActiveWorkbook.Routed Then
Message = MsgBox("Mail not sent", vbOKOnly, "Error"
ActiveWorkbook.Route
End If
ActiveWorkbook.Save
End Sub
Cyril Guichard
Mechanical Engineer
Private Sub App_WorkbookBeforeClose()
Dim Message
ActiveWorkbook.HasRoutingSlip = True
With ActiveWorkbook.RoutingSlip
.Delivery = xlAllAtOnce
.Recipients = Array("user1@mail", "user2@mail", "user3@mail"
.Subject = "Test"
.Message = "wooohoooo, it works"
End With
ActiveWorkbook.Route
If ActiveWorkbook.HasRoutingSlip And Not ActiveWorkbook.Routed Then
Message = MsgBox("Mail not sent", vbOKOnly, "Error"
ActiveWorkbook.Route
End If
ActiveWorkbook.Save
End Sub
Cyril Guichard
Mechanical Engineer