ASKER
ASKER
'=== trigger an event if an item is sent
Dim WithEvents colSentItems As Items
Private Sub colSentItems_ItemAdd(ByVal item As Object)
'=== modifier la catégorie avant d'envoyer un message
If item.Class = olMail Then
'move the item (mail) to your secret folder if it meet some parameters
End If
End Sub
dim mmessage As Outlook.MailItem
suj_ok = mmessage.Subject
msg_to_ok = mmessage.To
msg_from_ok = mmessage.SenderName
msg_cc_ok = mmessage.CC
you need to move the message: (do some testing, cause you can move it somewhere you might never find it)Dim projetdir As Outlook.MAPIFolder
Dim dos_rac As Outlook.NameSpace '=== racine de tous les dossiers
Set dos_rac = Outlook.GetNamespace("MAPI")
Set projetdir = dos_rac.Folders("userfolder").Folders("inbox").Folders("secretfolder"))
mmessage.Move projetdir
ASKER
ASKER
Microsoft Outlook is a personal information manager from Microsoft, available as a part of the Microsoft Office suite. Although often used mainly as an email application, it also includes a calendar, task manager, contact manager, note-taker, journal, and web browser.
TRUSTED BY
After sending the email, search for it in Sent Items and then move it to the appropriate folder.
The tricky part is in identifying the email. I'd bet that if you matched the sender, the recipient, the time, and the subject, you'd be fairly certain to get it right every time.
Of course, there would be a very short time where it appeared in Sent Items and there's a chance that the secretary would see it.