how to detect email is saved to draft?

Status
Not open for further replies.
A

amh

If I open an email stored in the draft folder, I can not detect that it

came from the draft folder. The parent folder is Outbook. I'm trying

to make sure I identify emails saved as drafts so I can process them

differently. I can't consistently determine a draft either - I've

checked the inspector's saved property, entryid, conversation index and

it is not always consistent. Any help is appreciated.

amh
 
K

Ken Slovak - [MVP - Outlook]

If you open an item stored in Drafts then Drafts is the parent folder and

you should be able to get that. I don't know what version of Outlook or what

type of code you're using, but this simple Outlook VBA code demonstrates how

to get "Drafts" out of that item:

Application.ActiveInspector.CurrentItem.Parent.Name

If you get that Parent object as a MAPIFolder object you can then have a

reference to the actual folder if you want it.

"amh" <amh.4ace35e@outlookbanter.com> wrote in message

news:amh.4ace35e@outlookbanter.com...

> If I open an email stored in the draft folder, I can not detect that it
> came from the draft folder. The parent folder is Outbook. I'm trying
> to make sure I identify emails saved as drafts so I can process them
> differently. I can't consistently determine a draft either - I've
> checked the inspector's saved property, entryid, conversation index and
> it is not always consistent. Any help is appreciated.

> > amh
 
A

amh

Sorry I should have been more clear. If I open an email in the draft

folder by double-clicking on it, thus opening an inspector, yes it

tells me that it's parent is the Draft folder. However, from the

explorer window if I right click, it lets me select reply or forward

even though it's never been sent and that is where I need to identify

it as coming from the draft folder. From the explorer window an email

in the draft folder tells me the parent is the Inbox.

Any help would be appreciated.

' - [MVP - Outlook Wrote:
> ;315699']If you open an item stored in Drafts then Drafts is the parent
> folder and
> you should be able to get that. I don't know what version of Outlook or
> what
> type of code you're using, but this simple Outlook VBA code
> demonstrates how
> to get "Drafts" out of that item:

> Application.ActiveInspector.CurrentItem.Parent.Name

> If you get that Parent object as a MAPIFolder object you can then have
> a
> reference to the actual folder if you want it.

> >

>

> "amh" amh.4ace35e@outlookbanter.com wrote in message
> news:amh.4ace35e@outlookbanter.com...-

> If I open an email stored in the draft folder, I can not detect that
> it
> came from the draft folder. The parent folder is Outbook. I'm
> trying
> to make sure I identify emails saved as drafts so I can process them
> differently. I can't consistently determine a draft either - I've
> checked the inspector's saved property, entryid, conversation index
> and
> it is not always consistent. Any help is appreciated.

> > amh -


amh
 
K

Ken Slovak - [MVP - Outlook]

But what you're doing when using reply or forward on a message, whether or

not it was ever sent, is opening a brand new email message.

Any new message always have Inbox as its parent folder. It's the same thing

if you reply to a message in Sent Items, or a custom email folder or

wherever. Inbox will be the parent until the item is saved, then it's

Drafts.

"amh" <amh.4ae893d@outlookbanter.com> wrote in message

news:amh.4ae893d@outlookbanter.com...

> Sorry I should have been more clear. If I open an email in the draft
> folder by double-clicking on it, thus opening an inspector, yes it
> tells me that it's parent is the Draft folder. However, from the
> explorer window if I right click, it lets me select reply or forward
> even though it's never been sent and that is where I need to identify
> it as coming from the draft folder. From the explorer window an email
> in the draft folder tells me the parent is the Inbox.

> Any help would be appreciated.
 
Status
Not open for further replies.
Top