title: Test whether a property name exists
body: <p>I'm getting this error:</p>
  
  <blockquote>
    <p>Run-time error '424' object required  </p>
  </blockquote>
  
  <p>when I try to run this code:</p>
  
  <pre><code>Sub SuperSaveAs()
  Set objFSO = CreateObject("Scripting.FileSystemObject")
  Dim pathName As String
  Dim myFileName As String
  
  If (ActiveDocument.CustomDocumentProperties("_CheckOutSrcUrl").Value = True) Then
      pathName = ActiveDocument.CustomDocumentProperties("_CheckOutSrcUrl").Value
      myFileName = pathName + ActiveWorkbook.Name
          ActiveWorkbook.SaveAs Filename:= _
              myFileName _
              , FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
  Else
      MsgBox "_CheckOutSrcUrl is missing"
  End If
  
  End Sub
  </code></pre>
  
  <p>This macro is connected with a button in Excel. The macro checks if the custom document property exists. If the custom document property exists the macro should save the file to the Value of <code>_CheckOutSrcUrl</code> (SharePoint Directory).
  How can I fix the error?</p>