+ Reply to Thread
Results 1 to 9 of 9

Outlook code - save attachments

  1. #1
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Outlook code - save attachments

    I'm trying to get this code running but I'm unsure where you declare Arg 1, Arg 2 and Arg 3? What do I have to change to Ron's code to make it work?


    http://www.rondebruin.nl/mail/folder2/saveatt.htm


    Please Login or Register  to view this content.
    Please Login or Register  to view this content.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: Outlook code - save attachments

    Hi Xx7,

    I see you are having an argument with the arguments

    It looks like you need to call the subroutine
    Please Login or Register  to view this content.
    followed by stuff. This stuff is called Arguments.

    To be more specific the
    Please Login or Register  to view this content.
    says you need to have 3 strings in the call like this:

    Please Login or Register  to view this content.
    The Strings are called Arguments to be passed to the subroutine.

    More specifically String1 needs to be.... read the code..

    So you would use this subroutine like:
    Please Login or Register  to view this content.

    Hope this helps.
    Last edited by MarvinP; 04-10-2011 at 01:52 PM. Reason: Added Code Tags
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Outlook code - save attachments

    Hello MarvinP,

    Please use code tags even around code fragments for better readability.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Outlook code - save attachments

    So, do I leave the code above the same and then insert a new sub procedure?

    Please Login or Register  to view this content.
    I get an error saying "The attempted operation failed. An object could not be found"

  5. #5
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,164

    Re: Outlook code - save attachments

    I would assume that one of the Arguments is not valid.

    Do you have Outlook running and open on your computer? Does the Inbox agree with what you are passing to the Sub? Does the "pdf" need a period in front of it like ".pdf"? Read the code and see what is needed exactly. All these may need to agree, based on how the sub is written.

    You should set breakpoints and step through the code to see where it fails. see http://www.cpearson.com/excel/Debug.htm

  6. #6
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Outlook code - save attachments

    If I have the 2 subs in my initial post. Don't I only have to run the "test" sub to get the macro to work? Do I change the code in the "test" sub or are you saying that I need a 3rd separate sub where I use something like:

    Please Login or Register  to view this content.

  7. #7
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Outlook code - save attachments

    Is there a particular reason why an Outlook question is posted in an XL forum?

  8. #8
    Forum Contributor
    Join Date
    01-30-2011
    Location
    Vancouver, Canada
    MS-Off Ver
    Excel 2010
    Posts
    604

    Re: Outlook code - save attachments

    Quote Originally Posted by arthurbr View Post
    Is there a particular reason why an Outlook question is posted in an XL forum?
    My fault... I didn't even consider that. just assumed everything from Ron de Bruins site was all excel related.

  9. #9
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Outlook code - save attachments

    OK
    I moved the thread to the appropriate forum

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1