Not exactly Diane.
My incoming mails (the .msg files) are saved in a network drive (to H:\XXX\99. DWH\Incoming Mails) thanks to an Outlook rule which runs also a script. Ok
Now i would like to add a rule (and a script) in order to extract attached file.
I already have a macro to do the...
Yeah :) It works great. Every time a mail which is under a rule, incomes, mail is tidied in the correct sub-folder and saved by the script executed by rule :p
But now i have another challenge...
This deals with attached file. I'm specialy interrested by two type of mails :
Thanks for your help. I will try this code as soon as possible. For now mine is obviously working and i already start to work on another one. But, i'm curious to try your code, specialy the "Case" part.
Anyway, thanks for helping. I'll keep you in touch with testing your lines.
Thank you to spend time for explaination. I finally found a way (with many help of Diane and Oliv').
This code allows to set scripts to Outlook rules (Règle 1, Régle 2....) and ask Outlook to save incoming mails (.msg) in différent paths, according mail body or subject (depending...
Ok Diane, so if i understand, in "ThisOutlookSession" i paste
Dim objApp As Outlook.Application
Dim objItem As MailItem
Set objApp = Application
Set objItem = objApp.ActiveExplorer.Selection.Item(1)
'macro name you want to run goes here
Here is my code. Whole lines are pasted in "ThisOutlookSession" and i have no other things in the project (no Module, No Class...)
First part is "regle part" (Means Rules Part). I use it for Outlook Rules. For example when an incoming mail with "Flobes" comes, rule runs in order to...
Thank you very much
So if i summarize, i put this code in a module :
Dim strFolderpath As String
Public Sub ruleGlobes(item As Outlook.MailItem)
strFolderpath = "H:\Function\07.delegates\02.Admin\Incoming Mails\Globes"
Public Sub SaveGlobes()
I would like rather to create one macro for each rules i made.
I still use this Macro
Public Sub SaveMessageAsMsg()
Dim oMail As Outlook.MailItem
Dim objItem As Object
Dim sPath As String
Dim dtDate As Date
Dim sName As String
Dim enviro As String
Wonderful website full of information.
I'm currently looking for a way to save email. Problem : Path will be change regarding both information, body and subject.
Each time a mail income in my Inbox, I would like to create a record of this mail on the network but path of...