How to use VBA to convert a file to Base64
I’m working on a PowerPoint add-in that stores a set of thumbnails in the presentation file’s Customer Data (a hidden XML repository available in every modern Office document).
Before I can store the thumbnails in XML, they must be converted to Base64 encoded strings.
The following encodes and decodes image files to and from Base64, using only two external libraries that are available by default in Microsoft Office 2007 and above.