How do I get rid of the draft before the question is displayed (so Outlook
will save a copy if the user answers Yes).
--
John Svercek
If you wanted to force the Inspector to close without saving or prompted you
could use the item's or Inspector's Close methods and one of the close enum
members: olDiscard, olPromptForSave or olSave.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"John Svercek" <JohnS...@discussions.microsoft.com> wrote in message
news:63ADDEC3-4C61-4150...@microsoft.com...
When a button is clicked I create a mailitem from the inspector. Like so
'we are in the mail so add the logo as attachment and logo & info to body
Set MyMailItem = CreateObject("Redemption.SafeMailItem")
Set MyOMailItem = m_oApp.ActiveInspector.CurrentItem
MyOMailItem.Save
MyMailItem.Item = MyOMailItem
The MyOMailItem.Save command has saved the mailitem to the Drafts folder.
Following the above code, I add information to the body. If the mail is
sent, the copy in the Drafts folder gets automatically deleted.
The problem arises if the mail item is closed (user clicks Close control).
At that time the user is asked if they want to save changes. If they say No,
the window is closed but the item remains in the Draft folder.
If I programatically delete the item in the Close event then the user is
never asked if they want to save a copy, which they may.
So, how can I delete the item if the user does not want it but leave it if
they do?
--
John Svercek
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"John Svercek" <JohnS...@discussions.microsoft.com> wrote in message
news:37E96071-7A27-47F8...@microsoft.com...
Since the .Saved parameter is readonly I cannot change it after I Save the
item.
--
John Svercek
"Ken Slovak - [MVP - Outlook]" wrote:
> You could check in the Close event for the Inspector and/or MailItem if
> ..Saved = True. That would tell you if the user had saved the item.
If you don't need that then the item would only be saved if your user
specifically saved it.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"John Svercek" <JohnS...@discussions.microsoft.com> wrote in message
news:474C4B87-71E2-4B3F...@microsoft.com...
Apparently this information is not available to Redemption unless the Save
is done first.
I could possibly work with the MyMailItem.Item.Body & .HTMLBody but I am not
sure of all the implications. I may try that for the next release if I cannot
find another way to do it.
--
John Svercek
"Ken Slovak - [MVP - Outlook]" wrote:
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"John Svercek" <JohnS...@discussions.microsoft.com> wrote in message
news:0F4C2D87-43B8-4EA2...@microsoft.com...
Trap the Item.Write event. That would fire whenever the item was saved. You
know when you're saving it in code, any other firing of that event would be
the user's doing.
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm
"Ken Slovak - [MVP - Outlook]" <kens...@mvps.org> wrote in message
news:e%235sV2$VGHA...@TK2MSFTNGP12.phx.gbl...