I have a some code that I need to put in a sub. It works fine in the body but when I move it to a sub I get "Not and object reference". Is there a way to pass the object inheritance to the a sub?
Dim objDocument As Document
If Len(objDocument.Forms.Item(objDocument.DocumentClass.BaseFormName).FormFields.Item(CurrentFieldName).Value)> 0 Then
FieldValue = objDocument.Forms.Item(objDocument.DocumentClass.BaseFormName).FormFields.Item(CurrentFieldName).Value
Else
FieldValue="N/A"
End If
Thanks Uncle Mike
Dim objDocument As Document
If Len(objDocument.Forms.Item(objDocument.DocumentClass.BaseFormName).FormFields.Item(CurrentFieldName).Value)> 0 Then
FieldValue = objDocument.Forms.Item(objDocument.DocumentClass.BaseFormName).FormFields.Item(CurrentFieldName).Value
Else
FieldValue="N/A"
End If
Thanks Uncle Mike