Using ContentObject.CanAdd method to avoid runtime errors

DOCX PDF C# VB