Check to see if the PDF file allows changing.
[read-only property] okToChange([out, retval] VARIANT_BOOL *ok)
This function returns false if the PDF file is encrypted and does not allow changing. The owner password can be used to circumvent this: if a valid owner password was supplied to loadFileWithPassword or loadStreamWithPassword, this function will always return true.
If Not pdf.okToChange Then ' can't change this document ... End If