Exporting (all) pages of a Visio document to separate PDF files

Just a short code dump. Maybe this is of some use for somebody else, too.

The code simply saves the current or all pages as PDFs. They are saved in a sub-folder "Images" next to your document and are named after the page.

Put it to good use :)

Meta