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?
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?
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
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.
Guess I can make a new thread asking for assistance in adjusting one of these instead of creating a macro.
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
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.
Yeah, I saw that one too.
remove the lines
and it won't delete themPlease Login or Register to view this content.
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.
No apologies necessary, that's VBA and code found doing more than expected
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?
Try something like this:
Displayalerts are only for overwriting and deleting worksheets and so.Please Login or Register to view this content.
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.
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?
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.
I don't see where you select the attachment to print it too, the count is okay but where does it print the attachment?
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
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
thanks a lot. I am just about to get off work, thank god.
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.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks