I am trying to create a button on a form that would simply save the document and close it. I was trying this:
XDocument.SaveAs(XDocument.ProjectName.valueOf())
Application.XDocuments.Close(XDocument)
Where ProjectName is a field on my form. I was trying to pass the value of the ProjectName field to the SaveAs method so that the form was saved ...