We’ve already looked at Microsoft Office document properties features. They are fully featured in Word and have limited availability in Excel so now we look at PowerPoint.
PowerPoint has little document automation. Word users are often surprised to discover that even basic field codes don’t exist in PowerPoint. As a result, PowerPoint has no direct way to drop document property text into a slide.
The clumsy workaround would be some VBA code that searched for special text in the slides. For example search for {Title} and replace with the current contents of the Title document property.
There’s some clever VBA code at SuperUser.com (from P.Boothroyd for NIS Oskemen) which does a similar but better job. The code has some nice features:
- Searches for any text between square brackets in the altText/title property of a text box. If that text matches the name of a property, the property value will be inserted into the text box.
- Works for inbuilt and custom properties in the one function.
- Adds two useful ‘properties’ [copyright] which adds the copyright symbol, author, company. [page] inserts the slide number.
- You could add your own special tags with code like this:
If propname = "????" Then
‘ do something here that fills getProperty
getProperty = “$$$$$$”
found = True
End If