+ Reply to Thread
Results 1 to 19 of 19

Macro to select several emails, hit print, print all.

  1. #1
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Macro to select several emails, hit print, print all.

    Can a macro be created that I can select X amount of emails in my inbox then run the macro and have it print the email, and any attachments for every selected email?

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Macro to select several emails, hit print, print all.

    I am sure there is. Have you tried Google search?
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Macro to select several emails, hit print, print all.

    wow. Great idea.

    I have, and the results are that either they want to automatically print every email or when I copy and paste, they don't do anything. Two examples:

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

  4. #4
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Macro to select several emails, hit print, print all.

    Guess I can make a new thread asking for assistance in adjusting one of these instead of creating a macro.

  5. #5
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Macro to select several emails, hit print, print all.

    True, because there is no final action just debug,print to place the output in the VBA editor's immediate window so you can see what the code does.
    But when you select the messages you want to print, what about the attachments, if they have any, print these too?
    You can just keep this thread and assistance will come, that's no problem

  6. #6
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Macro to select several emails, hit print, print all.

    Yeah. I need to print the email & the attachments. I found another code, that does work, but isn't exactly what I need. It only deletes the emails itself, and I don't want it deleting the emails either.


    Please Login or Register  to view this content.

  7. #7
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Macro to select several emails, hit print, print all.

    Yeah, I saw that one too.

    remove the lines
    Please Login or Register  to view this content.
    and it won't delete them

  8. #8
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Macro to select several emails, hit print, print all.

    Awesome. I apologize, i literally just found the code and didn't take the time to review and delete that before posting. That will resolve that, just have to print the attachments as well. I am going to try and maybe frankenstein another code to it.

  9. #9
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Macro to select several emails, hit print, print all.

    No apologies necessary, that's VBA and code found doing more than expected

  10. #10
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Macro to select several emails, hit print, print all.

    So i think it is working, but when it opens an excel file and prints, it then wants to prompt if I want to save my changes. Can you do a displayalerts.false type of thing with outlook?

  11. #11
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Macro to select several emails, hit print, print all.

    Try something like this:
    Please Login or Register  to view this content.
    Displayalerts are only for overwriting and deleting worksheets and so.

  12. #12
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Macro to select several emails, hit print, print all.

    Thanks, knew it from excel, but wasn't sure if there was a crossover with that. Sendkeys keeps appearing when I google but I get invalid character when i try to do it as shown https://msdn.microsoft.com/en-us/lib.../gg278655.aspx


    That did not seem to work
    Last edited by taylorsm; 05-04-2017 at 04:43 PM.

  13. #13
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Macro to select several emails, hit print, print all.

    I hate sendkeys, you're never sure you've got the right order or key sequence
    What does your vba code look like now, the one you're using?

  14. #14
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Macro to select several emails, hit print, print all.

    Just removed the .delete like you had said. Trick was to print one attachment manually and make sure that "print attachment" setting box was checked, then it stays that way and every time you run the macro, it'll print the attachments as well

    Please Login or Register  to view this content.

  15. #15
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Macro to select several emails, hit print, print all.

    I don't see where you select the attachment to print it too, the count is okay but where does it print the attachment?

  16. #16
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Macro to select several emails, hit print, print all.

    It is not in there, i tried and failed. But if you try and print like normal, you can set it to print attachments as default.

    https://support.office.com/en-us/art...e-8409ca6f776e

  17. #17
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Macro to select several emails, hit print, print all.

    I do have a rotuine that saves my attachments in a specific folder and as far as I can see that's the way to print them too, will take a look tomorrow.
    Am off to bed now, it's an early (06:00) rise again

  18. #18
    Forum Contributor
    Join Date
    01-09-2016
    Location
    USA,USA
    MS-Off Ver
    2016
    Posts
    1,192

    Re: Macro to select several emails, hit print, print all.

    thanks a lot. I am just about to get off work, thank god.

  19. #19
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,900

    Re: Macro to select several emails, hit print, print all.

    Good morning,
    This link has quiet a few options:
    http://www.slipstick.com/developer/p...s-they-arrive/
    You could extract those that you need.
    I don't know but I'm not for printing stuff without knowing how large the attachments are and so.
    You could add a check to see how large the attachment is and a user prompt asking to print anyway?
    Since attachments need to be saved (temporarily or not) before you can print them with these macro's you could also opt to save the attachments in a shared folder and then look at them afterwards.
    I would certainly not go for printing all (selected) by default, you could even opt to print everything to a pdf file (except pdf attachments ) and then browse thorough them.
    Just a couple of ideas which I am sure you have considered too.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Create a print macro that would automatically select print area?
    By Ron de Bruin in forum Excel Formulas & Functions
    Replies: 35
    Last Post: 09-06-2005, 05:05 PM
  2. [SOLVED] Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 04:05 PM
  3. [SOLVED] Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 PM
  4. [SOLVED] Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 PM
  5. Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 11:05 AM
  6. [SOLVED] Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  7. [SOLVED] Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM
  8. Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

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