how to detect email is saved to draft?

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

amh

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

Any help would be appreciated.

'Ken Slovak - [MVP - Outlook said:
;315699']If you open an item stored in Drafts then Drafts is the paren
folder and
you should be able to get that. I don't know what version of Outlook o
what
type of code you're using, but this simple Outlook VBA cod
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 hav
a
reference to the actual folder if you want it.




"amh" (e-mail address removed) wrote in message

If I open an email stored in the draft folder, I can not detect tha
it
came from the draft folder. The parent folder is Outbook. I'
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 inde
and
it is not always consistent. Any help is appreciated.
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top