Consulting

Results 1 to 10 of 10

Thread: vba to do several jobs

  1. #1

    Smile vba to do several jobs

    Morning guys,

    first post,
    we have been receiving 4 emails a day with orders in them as pdf attachments; this is set to increase to 400 emails a month..

    I am looking to create a macro or script to do the following.

    new mail comes in

    print the attachment
    mark as read
    move the mail to subfolder (create if does not exsist)
    and prehaps save a copy to a network drive.....

    most of the attachments are pdf format

    I have been looking over the last week there are bits, its putting the things together that baffles me...
    I have been messing with vba for about 6 months with excel, first go with outlook.


    cheers in advance

    steve

  2. #2
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    See http://www.codeforexcelandoutlook.co...ck-event-code/ for sample event code you can adapt for your needs.

    To print a PDF using VBA, see http://www.tek-tips.com/viewthread.c...1186576&page=1

    To mark a MailItem as Read, just set the UnRead property to False.

    To move a MailItem to another folder, call the Move method and pass a MAPIFolder object as the parameter. See http://www.codeforexcelandoutlook.co...ly-in-outlook/ for sample code that can be used to check for a given folder and create it if it doesn't exist.

    As far saving a copy, do you mean save a copy of the attachment, or the email?

    --JP

  3. #3

    Smile

    Hey JP

    save a copy of the attachment

    are you JP from codeforexcelandoutlook ?

    I was searching your site over the weekend and using the bits and pieces,

    Ilike the triage code

    my knowledge is limited its combining all the codes together I am having problems with

    cheers
    for the advice
    steve

  4. #4
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    The same. Thanks for visiting!

    The stock event code makes it easy, most of the code is written. You just have to make a few customizations (where indicated).

  5. #5
    Quote Originally Posted by JP2112
    The same. Thanks for visiting!

    The stock event code makes it easy, most of the code is written. You just have to make a few customizations (where indicated).
    Hey JP,

    do you fancy earning a few dollars by helping out
    I can get the bits of code working seperatley, but can not figure out how to combine all the code together ...

    Also thought about a button or a keyboard short cut to do this #



    Steve

  6. #6
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    Sure, just email me through the website:

    http://www.codeforexcelandoutlook.com/contact/

  7. #7
    Hey JP,

    You around!

    Do you need any more info form me?

    Ref this post and the posts I made through your site!

    cheers

    steve

  8. #8
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    Yes, but you have to contact me through the site, I don't conduct business in public.
    Regards,
    JP

    Read the FAQ
    Getting free help on the web
    My website
    Please use [vba][/vba] tags when posting code

  9. #9
    Quote Originally Posted by JP2112
    Yes, but you have to contact me through the site, I don't conduct business in public.
    Hi JP

    I have sent to mails to you through the link you posted

  10. #10
    VBAX Expert JP2112's Avatar
    Joined
    Oct 2008
    Location
    Astoria, NY
    Posts
    590
    Location
    Send me a PM through this board with your email address.
    Regards,
    JP

    Read the FAQ
    Getting free help on the web
    My website
    Please use [vba][/vba] tags when posting code

Posting Permissions

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