Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Visual Basic (https://www.askmehelpdesk.com/forumdisplay.php?f=469)
-   -   VBA Code to Save from Microsoft Outlook (https://www.askmehelpdesk.com/showthread.php?t=370985)

  • Jul 1, 2009, 11:17 AM
    jakester
    VBA Code to Save from Microsoft Outlook
    Hello -

    I hope my problem is a simple one. What I am attempting to do is create a VBA macro that will allow me to select an e-mail from my Outlook Inbox and save that e-mail (as an Outlook item) to a specified drive—C:\Outlook Items\

    I cannot record a macro in Outlook so I am stumped as to how I can do this.

    Your help would be greatly appreciated.
  • Jul 1, 2009, 08:15 PM
    Perito

    I wrote a VBA macro for Outlook that does this, and it's somewhere around here. Let me look it up tomorrow and I'll see what I can do. It wasn't trivial to write.
  • Jul 2, 2009, 06:41 AM
    jakester
    Quote:

    Originally Posted by Perito View Post
    I wrote a VBA macro for Outlook that does this, and it's somewhere around here. Let me look it up tomorrow and I'll see what I can do. It wasn't trivial to write.

    Thanks, Perito. I'll be looking out for it.
  • Jul 2, 2009, 08:58 AM
    Perito
    1 Attachment(s)
    This program was originally written on Outlook 2003 and the Outlook program was working through a Microsoft Exchange server. I don't think it will have any bearing on the functioning of the macro, but you never know. Parts of the program were created by others. Their code is unchanged and their copyrights are included in the source code. I haven't copyrighted my own code. It's yours to use or modify as you wish.

    I had to take the Outlook 2003 .OTM file (Outlook Macro), containing the macro, out of the zip file. Even zipped by itself, that file is too big for the forum. The attached zip file contains two .bas files that can be imported as "modules" and frminfo.frm and frminfo.frx that can be imported as a form. The code is in text format in the two .bas files and in the frminfo.frm file.

    By the way, this does a bit more than you're asking. It was originally intended to export all mail messages in all Outlook folders to text files in some directory. Files are named by the message title. Subdirectories are created for folders, and duplicate file names are treated by appending a number in parentheses at the end of the title.

    Standard Disclaimer: I'm not responsible for this if it does or doesn't work. Use it at your own risk.
  • Jul 3, 2009, 03:00 PM
    jakester
    Quote:

    Originally Posted by Perito View Post
    This program was originally written on Outlook 2003 and the Outlook program was working through a Microsoft Exchange server. I don't think it will have any bearing on the functioning of the macro, but you never know. Parts of the program were created by others. Their code is unchanged and their copyrights are included in the source code. I haven't copyrighted my own code. It's yours to use or modify as you wish.

    I had to take the Outlook 2003 .OTM file (Outlook Macro), containing the macro, out of the zip file. Even zipped by itself, that file is too big for the forum. The attached zip file contains two .bas files that can be imported as "modules" and frminfo.frm and frminfo.frx that can be imported as a form. The code is in text format in the two .bas files and in the frminfo.frm file.

    By the way, this does a bit more than you're asking. It was originally intended to export all mail messages in all Outlook folders to text files in some directory. Files are named by the message title. Subdirectories are created for folders, and duplicate file names are treated by appending a number in parentheses at the end of the title.

    Standard Disclaimer: I'm not responsible for this if it does or doesn't work. Use it at your own risk.

    Thanks dog ;)
  • Jul 3, 2009, 05:44 PM
    Perito
    Squeak?

  • All times are GMT -7. The time now is 01:37 AM.