Thats true, rules in outlook 2000 don't give you the option to Print automatically an email you send but it gives you the option ("rule") to print all the emails you receive.
So here is the Code you have to put inside Outlook Macros : Go in Tools/Macros , Visual Basic Editor and put those codes, the ' followed by a french comment is unnecessary. This is actually 2 Macros, one that will do the Send and print and one that will add a Key Send/Print next to the send button when you write an email, just run the macros and you will be all set. You will have to save the project too:
Public Sub SendWithPrint()
'Performe l'envoie de l'Email
Dim oInsp As Outlook.Inspector
Dim oMail As Outlook.MailItem
Dim oCntr As Object
Dim bNoMailItem As Boolean
If TypeName(Application.ActiveWindow) = "Inspector" Then
Set oInsp = Application.ActiveInspector
If TypeName(oInsp.CurrentItem) <> "MailItem" Then
bNoMailItem = True
End If
Else
bNoMailItem = True
End If
If bNoMailItem Then
MsgBox "Must be in the Email Window you want to send"
Exit Sub
End If
Set oMail = oInsp.CurrentItem
'Le Print Puis l'envoie
oMail.PrintOut
oMail.Send
End Sub
Public Sub AddButton()
'Ajout le bouton "Send/Print" a l'inspector's toolbar
Dim oInsp As Inspector
Dim bDontClose As Boolean
Dim cbb As CommandBarButton
Dim cbbSend2 As CommandBarButton
Dim cbStandard As CommandBar
Set oInsp = Application.CreateItem(olMailItem).GetInspector
On Error Resume Next
'Verifie que le button n'existe pas deja
Set cbStandard = oInsp.CommandBars("Standard")
Set cbb = cbStandard.FindControl(, , "SendWithPrint")
If Not cbb Is Nothing Then
'S'il existe -> rien a faire
Exit Sub
End If
'n'existe pas -> le met apres "Send" item (ID=2617)
Set cbb = cbStandard.FindControl(ID:=2617)
Set cbbSend2 = cbStandard.Controls.Add(msoControlButton, before:=cbb.Index + 1)
cbbSend2.TooltipText = "Send this Email and Print it"
cbbSend2.Caption = "Send/Print"
cbbSend2.Tag = "SendWithPrint"
'assigne la procedure
cbbSend2.OnAction = "SendWithPrint"
'utile pour faire l'action ...
oInsp.Close olDiscard
End Sub
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.