title: Method FieldNameToFieldConstant runtime Error 1004
body: <p>i had try make this macro for Microsoft Project is fine if work offline but if i try make work with project server the method return error 1004 in runtime. check the code above.</p>
  
  <pre><code>Function RetornaValorCampo(NomeCampo As String)
      Dim Campo
      Campo = FieldNameToFieldConstant("NomeCampo", pjTask)
      RetornaValorCampo = ActiveProject.ProjectSummaryTask.GetField(Campo)
  End Function
  </code></pre>
  
  <p>Tanks for any help. []'s </p>