Hello both,
Thanks for the replies - much appreciated.
To give some background on this, the reason we want to use a macro like this is we generate lots of client presentations using photos from our portfolio of work and typically save a copy of the presentation as PDF. You are probably aware that when importing
photos from a network drive, the AltText of the photo automatically shows the original file path in the PDF version.
We have in the past presented to clients (an example being be Coca-Cola*) where we have used images from our work with Pepsi*. We don't want "\work\clients\pepsi\design1.jpeg" showing as the AltText tooltip when hovering over a photo. This has happened
a few times and is a costly mistake for our company.
* Not actual clients of ours ;-)
There are two ways we know of dealing with this; either blank out the AltText, or turn off 'document structure tags' when saving as PDF.
We had created a custom button, and added to the toolbar, to allow users to click, which ran a macro to save the current presentation in PDF with the document structure tags turned off. However, lots of colleagues are forgetting/ignoring to do this so we
would like to build-in something foolproof. Hence the original question.
Thanks for Steve for the excellent guide to creating the add-in. It worked well. I actually changed the macro code to "msgbox "hello"" to get a visual indication of this working. However, I noticed it only showed this message box when the document was saved
as PPTX format and never when changing the drop down to PDF. I'm guessing this is because there is some in-built code that actually prints the presentation to PDF, rather than saving, so perhaps this whole idea isn't possible with BeforeSave (or even BeforeSaveAs).
Is there another way to tackle this and ensure that all PDF's are created either with blanked AltText's or document structure tags unchecked?
Thanks very much in advance.