Re: Saving email into a nested folder -- simple question?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




Thanks. This behavior really puzzled me. I suppose the Add method might as
well reference the default folder then!

I'll pick up your book and/or Thomas Rizzo's. I just began work on an
Outlook automation project and was surprised to find much less information
online from Microsoft than I'm used to.

--
Software Engineer
Educational & Community Supports
University of Oregon
Eugene, OR 97403-1235


"Sue Mosher [MVP-Outlook]" wrote:

> New messages always save in Drafts, regardless of what folder you use for the Items.Add method. You need to add a statement to move the saved message to the desired folder.
>
> movedMail = mobjMailMsg.Move(mobjMailFolder)
>
> Note that you don't need to close it because you never opened it.
>
> --
> Sue Mosher, Outlook MVP
> Author of
> Microsoft Outlook Programming - Jumpstart for
> Administrators, Power Users, and Developers
> http://www.outlookcode.com/jumpstart.aspx
>
>
> "Joseph Boland" <JosephBoland@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:8DB4FD96-ABCD-4957-897F-266937124FBC@xxxxxxxxxxxxxxxx
> > The VB.NET code below is supposed to create and save an email message in a
> > folder within the default drafts folder. It successfully creates the
> > subordinate folder but saves the email message in the root drafts folder
> > ("Drafts"). Why?
> >
> > 'Create a mail folder for application use within the root email drafts folder.
> > mobjEmailDrafts =
> > mobjNamespace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDrafts)
> > mobjMailFolder = mobjEmailDrafts.Folders.Add(AppMailFolder)
> > '...
> > mobjMailMsg = mobjMailFolder.Items.Add()
> > mobjRecipient = mobjMailMsg.Recipients.Add(RecipientEmailAddress)
> > mobjRecipient.Type = Outlook.OlMailRecipientType.olTo
> > mobjMailMsg.Subject = Subject
> > mobjMailMsg.Body = BodyText
> > mobjMailMsg.BodyFormat = Outlook.OlBodyFormat.olFormatPlain
> > mobjMailMsg.Save()
> > mobjMailMsg.Close(Outlook.OlInspectorClose.olSave)
>
>
.



Relevant Pages

  • Outlook crash
    ... I tried saving the email as a draft and got a message something about folder ... I went back to the main Outlook screen and clicked on drafts to verify it ... server or didn't have permission. ... I restarted Outlook and the message was still in the drafts folder, ...
    (microsoft.public.outlook.general)
  • Re: How to change mail path in outlook
    ... Suppose there is a mail in draft folder. ... But outlook generates path for another mail while it was not open. ... Saving an item fires item.Write. ... Also if we have a mail with subject mail1 under drafts folder and we ...
    (microsoft.public.outlook.program_addins)
  • Addressing emails
    ... I just moved my Outlook 2003 files to a new laptop. ... to send a new email message and try to address it by selecting the ... how to remove this folder from Outlook Address Book, ...
    (microsoft.public.outlook.contacts)
  • Re: Create simple form letter
    ... you can make a new email then click on send later then click on the outbox ... then click on the message and click on move to folder then click on drafts ... moving it from your outlooks outbox to the drafts folder then double click ... >>> It would be nice if I had a pre made letter in outlook that I could ...
    (microsoft.public.outlook)
  • Re: Outlook Drafts
    ... Does the message show in the in-box folder? ... Milly Staples [MVP - Outlook] ... | When an email message is saved to the drafts folder it will sit there ... | folder it will not disappear. ...
    (microsoft.public.office.misc)