
Save flagged email as file but send out unflagged email
Hi,
I think that this (see attached file) might be something
like what you want. It first saves the msg to disc, then
gives it a userproperty so we know we need to flag it,
then it sends the msg as usual. After sending the ItemAdd
event for the SentItems folder will be triggered and we
can flag the msg.
Hope this is what you ment.
Quote:
>-----Original Message-----
>Sorry guys I got it wrong the code below is working as
stated.
>What I actually want to do is flag the message in Sent
items but not
>the message going out.
>I cant seem to be able to do that.
>Mark
Quote:
>> The code works great here. Isn't the problem that the
msg
>> is saved without a file extension?
>> .SaveAs "c:\test.msg", olMSG
>> >-----Original Message-----
>> >How do I go about flagging an email then save it as
>> a .msg file on my
>> >hard disk then send the email out without a flag.
>> >Tried this so far, but with no luck:
>> > Dim objApp As Application
>> > Dim objInsp As Inspector
>> > Dim myCopy As MailItem
>> > Set objApp = CreateObject("Outlook.Application")
>> > Set objInsp = objApp.ActiveInspector
>> > ' make a copy of original here to send out
unflagged
>> > Set myCopy = objInsp.CurrentItem.Copy
>> > ' Send copy
>> > myCopy.Send
>> > ' flag message save it to disk and close it
>> > With objInsp.CurrentItem
>> > .FlagRequest = "My custom reference here"
>> > .SaveAs "c:\test", olMSG
>> > .Close 0
>> > End With
>> > Set objApp = Nothing
>> > Set objInsp = Nothing
>> > Set myCopy = Nothing
>> >Any help gratefully appreciated.
>> >Mark
>> >.
>.
|
|
Save_Send_and_FlagMail.txt
1K
Download
|