Save flagged email as file but send out unflagged email 
Author Message
 Save flagged email as file but send out unflagged email

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



Tue, 03 May 2005 00:25:12 GMT  
 Save flagged email as file but send out unflagged email
The code works great here. Isn't the problem that the msg
is saved without a file extension?
.SaveAs "c:\test.msg", olMSG

Quote:
>-----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
>.



Tue, 03 May 2005 19:16:01 GMT  
 Save flagged email as file but send out unflagged email
I get so many good ideas trawling through here!  Thanks to you all.

I can easily adapt the code below to save the message to an Outlook personal
folder, but is it possible to set a reminder on the flag?  It could be
either via an input box to get a date, or by adding x days to the current
date.

Ollie


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
> >.



Thu, 05 May 2005 18:33:35 GMT  
 Save flagged email as file but send out unflagged email
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
> >.



Fri, 06 May 2005 20:47:48 GMT  
 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


Sun, 08 May 2005 00:43:16 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. script which send an email to an email adress, with file attached

2. Parsing Email fields from saved EMAIL

3. Sending email to more then one email

4. Send a email to email-address with netscape ???

5. Send email from Acc97 to Lotus notes email.

6. VBA Send Email with specific Email Account

7. sending customized emails to emails in an excel spreadsheet

8. Same Email sent to multiple email accounts

9. Sending email to email address rather than that in the To: window

10. VBA - Sending email through a Specific Outlook Email Account

11. how to send notification email when new email arrives (help needed, please)

12. EMAIL - Sending email from app

 

 
Powered by phpBB® Forum Software