Yes - and the code is fairly straightforward.
However, can you describe the use case a bit more?
If you have control over the desktops that need to do this, then you'll be able to install a folder level script that will allow you to print the document and all of it's attachments with minimal user interaction.
If you were thinking of distributing the file and using a button to print everything, you're going to end up showing a dialog for each attachment being printed. I imagine that's not what you were hoping for.
Alternatively, if everyone is using Acrobat rather than Reader, then you can assemble the file and the attachment into a single hidden PDF that you then print.
It was for distributing the PDF. Now I’ll be creating a Portfolio, that can print all content in one go.
Thanks for taken the time to replay and ask.
Generally I don't recommend that Portfolios be used anymore... though t I did LOVE them at one time but for this use case, a portfolio is the better option. Note that if you distribute the PDF as a link, be sure to set the link to download the PDF or it will open in a browser that doesn't know how to print a Portfolio.
I’m also afraid Adobe drop the Portfolio features...